summaryrefslogtreecommitdiff
path: root/src/resolve/resolved-conf.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-10-27 03:01:06 +0100
committerLennart Poettering <lennart@poettering.net>2015-10-27 13:45:53 +0100
commitb5efdb8af40ea759a1ea584c1bc44ecc81dd00ce (patch)
tree8b8b3411e13a6c92d59e1b071b910aa6c44c7495 /src/resolve/resolved-conf.c
parent7d50b32a129e781401cf897475f388f682de1368 (diff)
util-lib: split out allocation calls into alloc-util.[ch]
Diffstat (limited to 'src/resolve/resolved-conf.c')
-rw-r--r--src/resolve/resolved-conf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/resolve/resolved-conf.c b/src/resolve/resolved-conf.c
index 17eafec2fa..c9919ced67 100644
--- a/src/resolve/resolved-conf.c
+++ b/src/resolve/resolved-conf.c
@@ -19,10 +19,11 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include "alloc-util.h"
#include "conf-parser.h"
+#include "extract-word.h"
#include "parse-util.h"
#include "resolved-conf.h"
-#include "extract-word.h"
#include "string-util.h"
int manager_parse_dns_server(Manager *m, DnsServerType type, const char *string) {
@@ -35,7 +36,7 @@ int manager_parse_dns_server(Manager *m, DnsServerType type, const char *string)
first = type == DNS_SERVER_FALLBACK ? m->fallback_dns_servers : m->dns_servers;
for(;;) {
- _cleanup_free_ char *word;
+ _cleanup_free_ char *word = NULL;
union in_addr_union addr;
bool found = false;
DnsServer *s;
@@ -44,7 +45,6 @@ int manager_parse_dns_server(Manager *m, DnsServerType type, const char *string)
r = extract_first_word(&string, &word, NULL, 0);
if (r < 0)
return log_error_errno(r, "Failed to parse resolved dns server syntax \"%s\": %m", string);
-
if (r == 0)
break;