]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
resolved: initialize variable (#4338)
authorThomas H. P. Andersen <phomes@gmail.com>
Tue, 11 Oct 2016 00:12:40 +0000 (02:12 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 11 Oct 2016 00:12:40 +0000 (20:12 -0400)
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.

src/resolve/resolved-dns-stub.c

index b1c570cee6effae27390aea14e1a7a856078db71..e76de6c06a3a8939f8aead67ca13ac69d05e4d80 100644 (file)
@@ -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);