summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2019-10-19 10:11:55 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2019-10-19 10:11:55 +0200
commit823fd459972beb02bc4148461247a01dc010a006 (patch)
treed2a32e4e89e5edc2d52c7a4c4efc839bb41f59e1
parentb65fc363fe84045861274de1f3acc5e1d8df2ad3 (diff)
New prototype for date_dos2unix()
-rw-r--r--src/common.c6
-rw-r--r--src/common.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/common.c b/src/common.c
index a7d170d..afcf387 100644
--- a/src/common.c
+++ b/src/common.c
@@ -226,12 +226,12 @@ char* strip_dup(char* str)
/* Convert a MS-DOS time/date pair to a UNIX date (seconds since 1 1 70). */
-int date_dos2unix(const unsigned short f_time, const unsigned short f_date)
+time_t date_dos2unix(const unsigned short f_time, const unsigned short f_date)
{
- static const int day_n[] = { 0,31,59,90,120,151,181,212,243,273,304,334,0,0,0,0 };
+ static const unsigned int day_n[] = { 0,31,59,90,120,151,181,212,243,273,304,334,0,0,0,0 };
/* JanFebMarApr May Jun Jul Aug Sep Oct Nov Dec */
- int month,year,secs;
+ unsigned int month,year,secs;
/* first subtract and mask after that... Otherwise, if
f_date == 0, bad things happen */
diff --git a/src/common.h b/src/common.h
index 46e9d7f..8a5e5ea 100644
--- a/src/common.h
+++ b/src/common.h
@@ -449,7 +449,7 @@ unsigned int up2power(const unsigned int number);
void set_part_name(partition_t *partition, const char *src, const unsigned int max_size);
void set_part_name_chomp(partition_t *partition, const unsigned char *src, const unsigned int max_size);
char* strip_dup(char* str);
-int date_dos2unix(const unsigned short f_time,const unsigned short f_date);
+time_t date_dos2unix(const unsigned short f_time,const unsigned short f_date);
void set_secwest(void);
time_t td_ntfs2utc (int64_t ntfstime);
#ifndef BSD_MAXPARTITIONS