summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-rtnl/sd-rtnl.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/sd-rtnl/sd-rtnl.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/sd-rtnl/sd-rtnl.c')
-rw-r--r--src/libsystemd/sd-rtnl/sd-rtnl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsystemd/sd-rtnl/sd-rtnl.c b/src/libsystemd/sd-rtnl/sd-rtnl.c
index a45ca5e9f5..5778ea53c0 100644
--- a/src/libsystemd/sd-rtnl/sd-rtnl.c
+++ b/src/libsystemd/sd-rtnl/sd-rtnl.c
@@ -187,7 +187,7 @@ sd_rtnl *sd_rtnl_unref(sd_rtnl *rtnl) {
assert_return(!rtnl_pid_changed(rtnl), NULL);
- if (REFCNT_DEC(rtnl->n_ref) <= 0) {
+ if (REFCNT_DEC(rtnl->n_ref) == 0) {
struct match_callback *f;
unsigned i;