summaryrefslogtreecommitdiffstats
path: root/ospf6d/ospf6d.h
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2015-03-03 08:48:11 +0100
committerDavid Lamparter <equinox@opensourcerouting.org>2015-04-19 20:40:19 +0200
commitef008d2f8dc8f7160d8a3d24a15f2fad79ef3242 (patch)
tree036d3b4c7bc0071f045bc1cb3a54c422dffc1806 /ospf6d/ospf6d.h
parentec62e1438ece9af0546f9028aa1403f2c84bf177 (diff)
downloadquagga-ef008d2f8dc8f7160d8a3d24a15f2fad79ef3242.tar.bz2
quagga-ef008d2f8dc8f7160d8a3d24a15f2fad79ef3242.tar.xz
*: use long long to print time_t
Since we can't assume time_t to be long, int, or even long long, this consistently uses %lld/long long (or %llu/unsigned long long in a few cases) to print time_t/susecond_t values. This should fix a bunch of warnings, on NetBSD in particular. (Unfortunately, there seems to be no "PRId64" style printing macro for time_t...) Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'ospf6d/ospf6d.h')
-rw-r--r--ospf6d/ospf6d.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/ospf6d/ospf6d.h b/ospf6d/ospf6d.h
index 4122b309..9e2efb41 100644
--- a/ospf6d/ospf6d.h
+++ b/ospf6d/ospf6d.h
@@ -71,19 +71,19 @@ extern struct thread_master *master;
} \
} while (0)
#endif /*timersub*/
-#define timerstring(tv, buf, size) \
- do { \
- if ((tv)->tv_sec / 60 / 60 / 24) \
- snprintf (buf, size, "%ldd%02ld:%02ld:%02ld", \
- (tv)->tv_sec / 60 / 60 / 24, \
- (tv)->tv_sec / 60 / 60 % 24, \
- (tv)->tv_sec / 60 % 60, \
- (tv)->tv_sec % 60); \
- else \
- snprintf (buf, size, "%02ld:%02ld:%02ld", \
- (tv)->tv_sec / 60 / 60 % 24, \
- (tv)->tv_sec / 60 % 60, \
- (tv)->tv_sec % 60); \
+#define timerstring(tv, buf, size) \
+ do { \
+ if ((tv)->tv_sec / 60 / 60 / 24) \
+ snprintf (buf, size, "%lldd%02lld:%02lld:%02lld", \
+ (tv)->tv_sec / 60LL / 60 / 24, \
+ (tv)->tv_sec / 60LL / 60 % 24, \
+ (tv)->tv_sec / 60LL % 60, \
+ (tv)->tv_sec % 60LL); \
+ else \
+ snprintf (buf, size, "%02lld:%02lld:%02lld", \
+ (tv)->tv_sec / 60LL / 60 % 24, \
+ (tv)->tv_sec / 60LL % 60, \
+ (tv)->tv_sec % 60LL); \
} while (0)
#define timerstring_local(tv, buf, size) \
do { \