chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
basic: parse_timestamp UTC and fractional seconds support
[elogind.git]
/
src
/
basic
/
time-util.h
diff --git
a/src/basic/time-util.h
b/src/basic/time-util.h
index a0c850b08386b23c8a6527e223f1c44bc357350b..ef49343a8211e964341959cb5b86a56d9823f20b 100644
(file)
--- a/
src/basic/time-util.h
+++ b/
src/basic/time-util.h
@@
-112,6
+112,8
@@
int parse_sec(const char *t, usec_t *usec);
// UNNEEDED clockid_t clock_boottime_or_monotonic(void);
// UNNEEDED clockid_t clock_boottime_or_monotonic(void);
-#define xstrftime(buf, fmt, tm) assert_se(strftime(buf, ELEMENTSOF(buf), fmt, tm) > 0)
+#define xstrftime(buf, fmt, tm) \
+ assert_message_se(strftime(buf, ELEMENTSOF(buf), fmt, tm) > 0, \
+ "xstrftime: " #buf "[] must be big enough")
// UNNEEDED int get_timezone(char **timezone);
// UNNEEDED int get_timezone(char **timezone);