summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-02-02 21:28:33 +0100
committerLennart Poettering <lennart@poettering.net>2015-02-02 21:28:33 +0100
commitbabc21fdc0c309e3f397fdb57fb3038b5bef654a (patch)
treefffdd267534a06c3403e0fd0f71948fce9d7a690
parentb7ce6b592d8908d378904323a4a6670bfe0b7ab1 (diff)
time-util: let's make xstrftime() useful for everybody, even if we only have a single user so far.
-rw-r--r--src/shared/time-util.h2
-rw-r--r--src/timedate/timedatectl.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/shared/time-util.h b/src/shared/time-util.h
index b55a660bb0..fbfbcbffcc 100644
--- 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)
diff --git a/src/timedate/timedatectl.c b/src/timedate/timedatectl.c
index 1f85536cf2..4d89886736 100644
--- a/src/timedate/timedatectl.c
+++ b/src/timedate/timedatectl.c
@@ -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;