diff options
author | Lennart Poettering <lennart@poettering.net> | 2016-02-16 19:36:47 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2016-02-20 22:42:29 +0100 |
commit | bd8650e9b8862fd42deb7e1c0b64e5bd63f2daf0 (patch) | |
tree | 183f552bad89a3b2e3b77231c8dba0f65572196c | |
parent | 32d2064523461b3761b51ad9c38f098c9ac2dbc9 (diff) |
test-lldp: fix error checking expressions
-rw-r--r-- | src/libsystemd-network/test-lldp.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libsystemd-network/test-lldp.c b/src/libsystemd-network/test-lldp.c index 7b8dd0ad88..768211a315 100644 --- a/src/libsystemd-network/test-lldp.c +++ b/src/libsystemd-network/test-lldp.c @@ -260,19 +260,19 @@ static int start_lldp(sd_lldp **lldp, sd_event *e, sd_lldp_callback_t cb, void * int r; r = sd_lldp_new(42, lldp); - if (r) + if (r < 0) return r; r = sd_lldp_attach_event(*lldp, e, 0); - if (r) + if (r < 0) return r; r = sd_lldp_set_callback(*lldp, cb, cb_data); - if (r) + if (r < 0) return r; r = sd_lldp_start(*lldp); - if (r) + if (r < 0) return r; return 0; @@ -282,11 +282,11 @@ static int stop_lldp(sd_lldp *lldp) { int r; r = sd_lldp_stop(lldp); - if (r) + if (r < 0) return r; r = sd_lldp_detach_event(lldp); - if (r) + if (r < 0) return r; sd_lldp_unref(lldp); |