chiark / gitweb /
time-util: let's make xstrftime() useful for everybody, even if we only have a single...
authorLennart Poettering <lennart@poettering.net>
Mon, 2 Feb 2015 20:28:33 +0000 (21:28 +0100)
committerLennart Poettering <lennart@poettering.net>
Mon, 2 Feb 2015 20:28:33 +0000 (21:28 +0100)
src/shared/time-util.h
src/timedate/timedatectl.c

index b55a660..fbfbcbf 100644 (file)
@@ -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)
index 1f85536..4d89886 100644 (file)
@@ -38,8 +38,6 @@
 #include "pager.h"
 #include "time-dst.h"
 
-#define xstrftime(buf, fmt, tm) assert_se(strftime(buf, sizeof(buf), fmt, tm) > 0)
-
 static bool arg_no_pager = false;
 static bool arg_ask_password = true;
 static BusTransport arg_transport = BUS_TRANSPORT_LOCAL;