summaryrefslogtreecommitdiff
path: root/src/cdf_time.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cdf_time.c')
-rw-r--r--src/cdf_time.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/cdf_time.c b/src/cdf_time.c
index 674e1a4..1e572de 100644
--- a/src/cdf_time.c
+++ b/src/cdf_time.c
@@ -27,7 +27,7 @@
#include "file.h"
#ifndef lint
-FILE_RCSID("@(#)$File: cdf_time.c,v 1.12 2012/05/15 17:14:36 christos Exp $")
+FILE_RCSID("@(#)$File: cdf_time.c,v 1.15 2014/05/14 23:15:42 christos Exp $")
#endif
#include <time.h>
@@ -117,7 +117,7 @@ cdf_timestamp_to_timespec(struct timespec *ts, cdf_timestamp_t t)
tm.tm_hour = (int)(t % 24);
t /= 24;
- // XXX: Approx
+ /* XXX: Approx */
tm.tm_year = (int)(CDF_BASE_YEAR + (t / 365));
rdays = cdf_getdays(tm.tm_year);
@@ -171,12 +171,13 @@ cdf_ctime(const time_t *sec, char *buf)
char *ptr = ctime_r(sec, buf);
if (ptr != NULL)
return buf;
- (void)snprintf(buf, 26, "*Bad* 0x%16.16llx\n", (long long)*sec);
+ (void)snprintf(buf, 26, "*Bad* 0x%16.16" INT64_T_FORMAT "x\n",
+ (long long)*sec);
return buf;
}
-#ifdef TEST
+#ifdef TEST_TIME
int
main(int argc, char *argv[])
{