From: Lennart Poettering Date: Mon, 2 Feb 2015 20:28:33 +0000 (+0100) Subject: time-util: let's make xstrftime() useful for everybody, even if we only have a single... X-Git-Tag: v219~193 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=babc21fdc0c309e3f397fdb57fb3038b5bef654a time-util: let's make xstrftime() useful for everybody, even if we only have a single user so far. --- diff --git a/src/shared/time-util.h b/src/shared/time-util.h index b55a660bb..fbfbcbffc 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 1f85536cf..4d8988673 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;