libsystemd-network: use assert_se
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 20 Jan 2016 00:45:58 +0000 (19:45 -0500)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 20 Jan 2016 23:55:55 +0000 (18:55 -0500)
It cannot fail.

CID #1320623.

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

index 6fb80dd..c65237a 100644 (file)
@@ -453,7 +453,7 @@ static int lease_parse_classless_routes(
                 if (len < 4)
                         return -EINVAL;
 
-                lease_parse_be32(option, 4, &route->gw_addr.s_addr);
+                assert_se(lease_parse_be32(option, 4, &route->gw_addr.s_addr) >= 0);
                 option += 4;
                 len -= 4;