diff options
author | Tom Gundersen <teg@jklm.no> | 2015-10-27 16:55:16 +0100 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2015-10-27 16:55:16 +0100 |
commit | 0d0696812980d8f41c54739ad73716a233a2fa7c (patch) | |
tree | 217d98308a3039e106efde5fd6a7b6a657916950 /src/timesync/timesyncd-conf.c | |
parent | f47fc3ffc4b69a00083a76308f777b52afb8efbf (diff) | |
parent | 7760171904ef007f19e8f46aa240a00e382d5b74 (diff) |
Merge pull request #1691 from poettering/util-lib-3
split up util.h and macro.h into even more bits
Diffstat (limited to 'src/timesync/timesyncd-conf.c')
-rw-r--r-- | src/timesync/timesyncd-conf.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/timesync/timesyncd-conf.c b/src/timesync/timesyncd-conf.c index ad6fd180e4..be651fc636 100644 --- a/src/timesync/timesyncd-conf.c +++ b/src/timesync/timesyncd-conf.c @@ -19,6 +19,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ +#include "alloc-util.h" #include "string-util.h" #include "timesyncd-manager.h" #include "timesyncd-server.h" @@ -35,16 +36,16 @@ int manager_parse_server_string(Manager *m, ServerType type, const char *string) first = type == SERVER_FALLBACK ? m->fallback_servers : m->system_servers; for (;;) { - _cleanup_free_ char *word; + _cleanup_free_ char *word = NULL; bool found = false; ServerName *n; r = extract_first_word(&string, &word, NULL, 0); if (r < 0) return log_error_errno(r, "Failed to parse timesyncd server syntax \"%s\": %m", string); - if (r == 0) break; + /* Filter out duplicates */ LIST_FOREACH(names, n, first) if (streq_ptr(n->string, word)) { |