]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
lldp: fix assertion checking argument for sd_lldp_set_neighbors_max()
authorThomas Haller <thaller@redhat.com>
Fri, 5 Jun 2020 17:48:13 +0000 (19:48 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Sat, 6 Jun 2020 08:38:50 +0000 (10:38 +0200)
Fixes: 34437b4f9c9c ('sd-lldp: rework sd-lldp API')
src/libsystemd-network/sd-lldp.c

index 1f28c5731f00d350ecb3ee544ee770859cea628b..d3606cf5013da5bfed7785a23ca59f0da22487f4 100644 (file)
@@ -466,7 +466,7 @@ _public_ int sd_lldp_get_neighbors(sd_lldp *lldp, sd_lldp_neighbor ***ret) {
 
 _public_ int sd_lldp_set_neighbors_max(sd_lldp *lldp, uint64_t m) {
         assert_return(lldp, -EINVAL);
-        assert_return(m <= 0, -EINVAL);
+        assert_return(m > 0, -EINVAL);
 
         lldp->neighbors_max = m;
         lldp_make_space(lldp, 0);