diff options
author | Tom Gundersen <teg@jklm.no> | 2014-09-25 15:49:43 +0200 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2014-09-25 15:59:24 +0200 |
commit | 94a2c2f64a1379ca5c9ce4dbbee45ce17250ab51 (patch) | |
tree | 687792ece90bdaaa6354db36e47efbb3eac1a573 /src/bus-proxyd/bus-proxyd.c | |
parent | a34286684ebb78dd3db0d7f34feb2c121c9d00cc (diff) |
bus-proxyd: add some asserts
Both as documentation, and to make Coverity happy.
Fixes CID #1241495 and #1241496.
Diffstat (limited to 'src/bus-proxyd/bus-proxyd.c')
-rw-r--r-- | src/bus-proxyd/bus-proxyd.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/bus-proxyd/bus-proxyd.c b/src/bus-proxyd/bus-proxyd.c index a5387bb234..6a0fc7edfb 100644 --- a/src/bus-proxyd/bus-proxyd.c +++ b/src/bus-proxyd/bus-proxyd.c @@ -373,6 +373,8 @@ static int synthetic_reply_method_error(sd_bus_message *call, const sd_bus_error _cleanup_bus_message_unref_ sd_bus_message *m = NULL; int r; + assert(call); + if (call->header->flags & BUS_MESSAGE_NO_REPLY_EXPECTED) return 0; @@ -387,6 +389,8 @@ static int synthetic_reply_method_errno(sd_bus_message *call, int error, const s _cleanup_bus_error_free_ sd_bus_error berror = SD_BUS_ERROR_NULL; + assert(call); + if (call->header->flags & BUS_MESSAGE_NO_REPLY_EXPECTED) return 0; @@ -402,6 +406,8 @@ static int synthetic_reply_method_return(sd_bus_message *call, const char *types _cleanup_bus_message_unref_ sd_bus_message *m = NULL; int r; + assert(call); + if (call->header->flags & BUS_MESSAGE_NO_REPLY_EXPECTED) return 0; @@ -426,6 +432,8 @@ static int synthetic_reply_return_strv(sd_bus_message *call, char **l) { _cleanup_bus_message_unref_ sd_bus_message *m = NULL; int r; + assert(call); + r = sd_bus_message_new_method_return(call, &m); if (r < 0) return synthetic_reply_method_errno(call, r, NULL); |