summaryrefslogtreecommitdiff
path: root/src/libsystemd-network/sd-ipv4ll.c
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2015-01-13 23:03:11 +0100
committerTom Gundersen <teg@jklm.no>2015-01-13 23:03:11 +0100
commitf0c4b1c3fd827b429ba36aa45fd39e0a023cbf2c (patch)
treeacf63f10a03907abe79c07a6ff4dd25fb4371409 /src/libsystemd-network/sd-ipv4ll.c
parentab5e3a1bccaf79d65c93fc15ddeaa7595ffe0b86 (diff)
refcnt: refcnt is unsigned, fix comparisons
This does not make a difference, but the code was confusing.
Diffstat (limited to 'src/libsystemd-network/sd-ipv4ll.c')
-rw-r--r--src/libsystemd-network/sd-ipv4ll.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsystemd-network/sd-ipv4ll.c b/src/libsystemd-network/sd-ipv4ll.c
index 8626d4afa9..02f2f9e0a9 100644
--- a/src/libsystemd-network/sd-ipv4ll.c
+++ b/src/libsystemd-network/sd-ipv4ll.c
@@ -605,7 +605,7 @@ sd_ipv4ll *sd_ipv4ll_ref(sd_ipv4ll *ll) {
}
sd_ipv4ll *sd_ipv4ll_unref(sd_ipv4ll *ll) {
- if (ll && REFCNT_DEC(ll->n_ref) <= 0) {
+ if (ll && REFCNT_DEC(ll->n_ref) == 0) {
ll->receive_message =
sd_event_source_unref(ll->receive_message);
ll->fd = safe_close(ll->fd);