summaryrefslogtreecommitdiff
path: root/src/libsystemd-rtnl/sd-rtnl.c
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2013-12-06 15:13:34 +0100
committerTom Gundersen <teg@jklm.no>2013-12-16 17:28:18 +0100
commit9d0db17836c867ab2b8f460f649a478bf9f291d2 (patch)
treea3e1aca530481abf1244972b5d0b39c45366e63c /src/libsystemd-rtnl/sd-rtnl.c
parent3e10a9f410da15a8c8384b2d7fcf29d138c6f327 (diff)
rtnl: clean up/add asserts
Diffstat (limited to 'src/libsystemd-rtnl/sd-rtnl.c')
-rw-r--r--src/libsystemd-rtnl/sd-rtnl.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libsystemd-rtnl/sd-rtnl.c b/src/libsystemd-rtnl/sd-rtnl.c
index 98d0f89e52..c933ac5fb4 100644
--- a/src/libsystemd-rtnl/sd-rtnl.c
+++ b/src/libsystemd-rtnl/sd-rtnl.c
@@ -75,6 +75,8 @@ int sd_rtnl_open(uint32_t groups, sd_rtnl **ret) {
socklen_t addrlen;
int r;
+ assert_return(ret, -EINVAL);
+
r = sd_rtnl_new(&rtnl);
if (r < 0)
return r;
@@ -316,6 +318,8 @@ static int process_running(sd_rtnl *rtnl, sd_rtnl_message **ret) {
_cleanup_sd_rtnl_message_unref_ sd_rtnl_message *m = NULL;
int r;
+ assert(rtnl);
+
r = process_timeout(rtnl);
if (r != 0)
goto null_message;