chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
logind: after deserializatio readd systemd units to unit-to-object hashmap correctly
[elogind.git]
/
src
/
timedate
/
timedated.c
diff --git
a/src/timedate/timedated.c
b/src/timedate/timedated.c
index 4efa806c399d97f85136ad38dfe734d2789026b5..cdb6e5b16cfeffdceba63778a3b46377c3a6acbd 100644
(file)
--- a/
src/timedate/timedated.c
+++ b/
src/timedate/timedated.c
@@
-90,6
+90,8
@@
typedef struct TZ {
} TZ;
static TZ tz = {
} TZ;
static TZ tz = {
+ .zone = NULL,
+ .local_rtc = false,
.can_ntp = -1,
.use_ntp = -1,
};
.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;
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) {
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) {
}
static char** get_ntp_services(void) {
-
char _cleanup_strv_free_
**r = NULL, **files;
+
_cleanup_strv_free_ char
**r = NULL, **files;
char **i;
int k;
char **i;
int k;
@@
-282,7
+284,7
@@
static char** get_ntp_services(void) {
return NULL;
STRV_FOREACH(i, files) {
return NULL;
STRV_FOREACH(i, files) {
-
FILE _cleanup_fclose_
*f;
+
_cleanup_fclose_ FILE
*f;
f = fopen(*i, "re");
if (!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 (l[0] == 0 || l[0] == '#')
continue;
- if (strv_extend(&r, l) < 0)
+ if (strv_extend(&r, l) < 0)
{
log_oom();
log_oom();
- return NULL;
+ return NULL;
+ }
}
}
}
}