network: fix use of uninitialized value
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 30 Jul 2020 03:45:36 +0000 (12:45 +0900)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 30 Jul 2020 05:38:18 +0000 (07:38 +0200)
Follow-up for 6e537f62d71edea5bfcd2e2675c35ee840ffdc1f.

src/network/networkd-dhcp4.c

index 7576aaf..722e0d2 100644 (file)
@@ -548,7 +548,7 @@ static int dhcp4_remove_all(Link *link) {
 }
 
 static int dhcp_lease_lost(Link *link) {
-        int k, r;
+        int k, r = 0;
 
         assert(link);
         assert(link->dhcp_lease);