X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Ftimedate%2Ftimedated.c;h=cdb6e5b16cfeffdceba63778a3b46377c3a6acbd;hb=7fd1b19bc9e9f5574f2877936b8ac267c7706947;hp=4efa806c399d97f85136ad38dfe734d2789026b5;hpb=d257f05a5f9710c9e6ca558fbabc77e504ca8668;p=elogind.git diff --git a/src/timedate/timedated.c b/src/timedate/timedated.c index 4efa806c3..cdb6e5b16 100644 --- a/src/timedate/timedated.c +++ b/src/timedate/timedated.c @@ -90,6 +90,8 @@ typedef struct TZ { } TZ; static TZ tz = { + .zone = NULL, + .local_rtc = false, .can_ntp = -1, .use_ntp = -1, }; @@ -216,7 +218,7 @@ static int write_data_timezone(void) { static int write_data_local_rtc(void) { int r; - char _cleanup_free_ *s = NULL, *w = NULL; + _cleanup_free_ char *s = NULL, *w = NULL; r = read_full_file("/etc/adjtime", &s, NULL); if (r < 0) { @@ -268,7 +270,7 @@ static int write_data_local_rtc(void) { } static char** get_ntp_services(void) { - char _cleanup_strv_free_ **r = NULL, **files; + _cleanup_strv_free_ char **r = NULL, **files; char **i; int k; @@ -282,7 +284,7 @@ static char** get_ntp_services(void) { return NULL; STRV_FOREACH(i, files) { - FILE _cleanup_fclose_ *f; + _cleanup_fclose_ FILE *f; f = fopen(*i, "re"); if (!f) @@ -303,9 +305,10 @@ static char** get_ntp_services(void) { if (l[0] == 0 || l[0] == '#') continue; - if (strv_extend(&r, l) < 0) + if (strv_extend(&r, l) < 0) { log_oom(); - return NULL; + return NULL; + } } }