From: Yu Watanabe Date: Mon, 16 Feb 2026 00:51:36 +0000 (+0900) Subject: timesync: return earlier when an empty string is specified X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b0ca2ef2649e6d43abbf0fab9910217ca3bd6e84;p=thirdparty%2Fsystemd.git timesync: return earlier when an empty string is specified --- diff --git a/src/timesync/timesyncd-conf.c b/src/timesync/timesyncd-conf.c index 1ae41565201..f0af1f9d437 100644 --- a/src/timesync/timesyncd-conf.c +++ b/src/timesync/timesyncd-conf.c @@ -84,15 +84,16 @@ int config_parse_servers( assert(lvalue); assert(rvalue); - if (isempty(rvalue)) + if (isempty(rvalue)) { manager_flush_server_names(m, ltype); - else { - r = manager_parse_server_string(m, ltype, rvalue); - if (r < 0) { - log_syntax(unit, LOG_WARNING, filename, line, r, - "Failed to parse NTP server string '%s', ignoring: %m", rvalue); - return 0; - } + return 0; + } + + r = manager_parse_server_string(m, ltype, rvalue); + if (r < 0) { + log_syntax(unit, LOG_WARNING, filename, line, r, + "Failed to parse NTP server string '%s', ignoring: %m", rvalue); + return 0; } return 0;