summaryrefslogtreecommitdiffstats
path: root/src/fat_adv.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2017-04-15 12:00:24 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2017-04-15 12:00:24 +0200
commita1419a0806b4270bfad92ea496624b2edee5062c (patch)
treed08d076cd116f0a05092d49ddac393bfc82ab3b9 /src/fat_adv.c
parent1cba494e472d280483cc3bf05940efd061846a9e (diff)
Use localtime_t() instead of localtime()
Diffstat (limited to 'src/fat_adv.c')
-rw-r--r--src/fat_adv.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/src/fat_adv.c b/src/fat_adv.c
index aef17ec..8444263 100644
--- a/src/fat_adv.c
+++ b/src/fat_adv.c
@@ -62,7 +62,6 @@
#define INTER_FAT_ASK_Y 23
#define INTER_FATBS_X 0
#define INTER_FATBS_Y 22
-extern const char *monstr[];
typedef struct info_offset_struct info_offset_t;
@@ -217,18 +216,7 @@ static int ask_root_directory(disk_t *disk_car, const partition_t *partition, co
}
else
waddstr(window, " ");
- {
- const struct tm *tm_p;
- if(current_file->td_mtime!=0 && (tm_p=localtime(&current_file->td_mtime))!=NULL)
- {
- snprintf(datestr, sizeof(datestr),"%2d-%s-%4d %02d:%02d",
- tm_p->tm_mday, monstr[tm_p->tm_mon],
- 1900 + tm_p->tm_year, tm_p->tm_hour,
- tm_p->tm_min);
- } else {
- strncpy(datestr, " ",sizeof(datestr));
- }
- }
+ set_datestr((char *)&datestr, sizeof(datestr), current_file->td_mtime);
mode_string(current_file->st_mode, str);
wprintw(window, "%s %3u %3u ",
str, (unsigned int)current_file->st_uid, (unsigned int)current_file->st_gid);