summaryrefslogtreecommitdiff
path: root/src/basic/time-util.c
diff options
context:
space:
mode:
authorMarcel Hollerbach <marcel-hollerbach@t-online.de>2017-09-19 17:00:56 +0200
committerMarcel Hollerbach <marcel-hollerbach@t-online.de>2017-09-21 14:39:08 +0200
commitff69484a1faa82bb7b7929de2c6673f1f7e7b2cc (patch)
tree88834693138b0a1027fb9ca1f02617f69ffbdfec /src/basic/time-util.c
parent983226f35a648e308ecaec269dafe4ab6129b5d5 (diff)
downloadsystemd-ff69484a1faa82bb7b7929de2c6673f1f7e7b2cc.tar.gz
time-util: fix shadowing of timezone
timezone was shadowing timezone from time.h which leads to a buildbreak since systemd is built with -Werror
Diffstat (limited to 'src/basic/time-util.c')
-rw-r--r--src/basic/time-util.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/basic/time-util.c b/src/basic/time-util.c
index 00979bfe59..defb2766e2 100644
--- a/src/basic/time-util.c
+++ b/src/basic/time-util.c
@@ -883,16 +883,16 @@ typedef struct ParseTimestampResult {
} ParseTimestampResult;
int parse_timestamp(const char *t, usec_t *usec) {
- char *last_space, *timezone = NULL;
+ char *last_space, *tz = NULL;
ParseTimestampResult *shared, tmp;
int r;
pid_t pid;
last_space = strrchr(t, ' ');
if (last_space != NULL && timezone_is_valid(last_space + 1))
- timezone = last_space + 1;
+ tz = last_space + 1;
- if (timezone == NULL || endswith_no_case(t, " UTC"))
+ if (tz == NULL || endswith_no_case(t, " UTC"))
return parse_timestamp_impl(t, usec, false);
t = strndupa(t, last_space - t);
@@ -910,7 +910,7 @@ int parse_timestamp(const char *t, usec_t *usec) {
}
if (pid == 0) {
- if (setenv("TZ", timezone, 1) != 0) {
+ if (setenv("TZ", tz, 1) != 0) {
shared->return_value = negative_errno();
_exit(EXIT_FAILURE);
}