From: Thomas H. P. Andersen Date: Tue, 11 Oct 2016 00:12:40 +0000 (+0200) Subject: resolved: initialize variable (#4338) X-Git-Tag: v232~120 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=01b0669e9ac772d8eeed447ee469b7d4131c3ced;p=thirdparty%2Fsystemd.git resolved: initialize variable (#4338) r was not initialized and would be used if "tcp" was the only option used for the stub. We should initialize it to 0 to indicate that no error happened in the udp case. --- diff --git a/src/resolve/resolved-dns-stub.c b/src/resolve/resolved-dns-stub.c index b1c570cee6e..e76de6c06a3 100644 --- a/src/resolve/resolved-dns-stub.c +++ b/src/resolve/resolved-dns-stub.c @@ -498,7 +498,7 @@ static int manager_dns_stub_tcp_fd(Manager *m) { int manager_dns_stub_start(Manager *m) { const char *t = "UDP"; - int r; + int r = 0; assert(m);