chiark / gitweb /
[1/5] Apply missing fixes from upstream
[elogind.git] / src / basic / time-util.h
index a0c850b08386b23c8a6527e223f1c44bc357350b..ef49343a8211e964341959cb5b86a56d9823f20b 100644 (file)
@@ -112,6 +112,8 @@ int parse_sec(const char *t, usec_t *usec);
 
 // 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);