summaryrefslogtreecommitdiff
path: root/src/libsystemd-bus/sd-bus.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-11-05 19:14:58 +0100
committerLennart Poettering <lennart@poettering.net>2013-11-05 19:14:58 +0100
commit9d6c7c821cbf6655ecde62d2e283a6c94021f781 (patch)
tree32dc7d9a0d04db6bde848a6dcd6e05e30f46bb27 /src/libsystemd-bus/sd-bus.c
parent4686d1b6ee73f1e0cea25f621561b668aa2d6651 (diff)
bus: make use of assert_return() in all API calls that don't use it yet
Diffstat (limited to 'src/libsystemd-bus/sd-bus.c')
-rw-r--r--src/libsystemd-bus/sd-bus.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/libsystemd-bus/sd-bus.c b/src/libsystemd-bus/sd-bus.c
index f42d5d0ee1..a9f238ef22 100644
--- a/src/libsystemd-bus/sd-bus.c
+++ b/src/libsystemd-bus/sd-bus.c
@@ -1187,8 +1187,7 @@ void sd_bus_close(sd_bus *bus) {
}
sd_bus *sd_bus_ref(sd_bus *bus) {
- if (!bus)
- return NULL;
+ assert_return(bus, NULL);
assert_se(REFCNT_INC(bus->n_ref) >= 2);
@@ -1196,8 +1195,7 @@ sd_bus *sd_bus_ref(sd_bus *bus) {
}
sd_bus *sd_bus_unref(sd_bus *bus) {
- if (!bus)
- return NULL;
+ assert_return(bus, NULL);
if (REFCNT_DEC(bus->n_ref) <= 0)
bus_free(bus);