]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sd-netlink: fix assert 2293/head
authorDaniel Mack <daniel@zonque.org>
Sun, 10 Jan 2016 14:36:03 +0000 (15:36 +0100)
committerDaniel Mack <daniel@zonque.org>
Sun, 10 Jan 2016 14:36:03 +0000 (15:36 +0100)
nl->fd can be 0.

src/libsystemd/sd-netlink/netlink-socket.c

index 218120101707e5f0052490e47d82a82000bb2d52..e95c99af0d3e1d5fb874863860d7ba6eee36f173 100644 (file)
@@ -52,7 +52,7 @@ static int broadcast_groups_get(sd_netlink *nl) {
         int r;
 
         assert(nl);
-        assert(nl->fd > 0);
+        assert(nl->fd >= 0);
 
         r = getsockopt(nl->fd, SOL_NETLINK, NETLINK_LIST_MEMBERSHIPS, NULL, &len);
         if (r < 0) {