chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
time-util: let's make xstrftime() useful for everybody, even if we only have a single...
[elogind.git]
/
src
/
shared
/
time-util.h
diff --git
a/src/shared/time-util.h
b/src/shared/time-util.h
index b55a660bb006c140d5387d95c27bee8b603a22d2..fbfbcbffcc173fbca0787ae854f1b82fba6198e3 100644
(file)
--- a/
src/shared/time-util.h
+++ b/
src/shared/time-util.h
@@
-107,3
+107,5
@@
int get_timezones(char ***l);
bool timezone_is_valid(const char *name);
clockid_t clock_boottime_or_monotonic(void);
+
+#define xstrftime(buf, fmt, tm) assert_se(strftime(buf, ELEMENTSOF(buf), fmt, tm) > 0)