chiark / gitweb /
sd-dhcp-server: avoid returning garbage value
authorThomas Hindoe Paaboel Andersen <phomes@gmail.com>
Sun, 3 Aug 2014 17:45:20 +0000 (19:45 +0200)
committerThomas Hindoe Paaboel Andersen <phomes@gmail.com>
Sun, 3 Aug 2014 18:42:59 +0000 (20:42 +0200)
Force renewing with a pool size of 0 would return the uninitialized r.

src/libsystemd-network/sd-dhcp-server.c

index 2d3eaa3..50d9b7f 100644 (file)
@@ -919,7 +919,7 @@ int sd_dhcp_server_start(sd_dhcp_server *server) {
 
 int sd_dhcp_server_forcerenew(sd_dhcp_server *server) {
         unsigned i;
-        int r;
+        int r = 0;
 
         assert_return(server, -EINVAL);
         assert(server->bound_leases);