chiark / gitweb /
refcnt: refcnt is unsigned, fix comparisons
[elogind.git] / src / libsystemd-network / sd-icmp6-nd.c
index fbaf093ad88fe00d1286741af335ae8543d508fe..d2bff8fcf656ff3de3efb694effc63a529e50f9b 100644 (file)
@@ -145,7 +145,7 @@ static int icmp6_nd_init(sd_icmp6_nd *nd) {
 }
 
 sd_icmp6_nd *sd_icmp6_nd_unref(sd_icmp6_nd *nd) {
-        if (nd && REFCNT_DEC(nd->n_ref) <= 0) {
+        if (nd && REFCNT_DEC(nd->n_ref) == 0) {
 
                 icmp6_nd_init(nd);
                 sd_icmp6_nd_detach_event(nd);