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 b55a660bb006c140d5387d95c27bee8b603a22d2..fbfbcbffcc173fbca0787ae854f1b82fba6198e3 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 1f85536cf2a60feb1f281424564ceaa747ed67d1..4d898867362da47d33d8b843c9d025e348e14b0c 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;