diff options
author | Tanu Kaskinen <tanu.kaskinen@digia.com> | 2012-03-28 14:47:20 +0300 |
---|---|---|
committer | Tanu Kaskinen <tanuk@iki.fi> | 2012-03-28 17:34:19 +0300 |
commit | 1c134f45170df1832a982e4653a4054d53a08bf9 (patch) | |
tree | dea2d2ea11732b748b38485f06ce14ea34be1ed6 | |
parent | 87479307477496d1e3f6720ed9c15d1c890e9b73 (diff) | |
download | pulseaudio-panda-1c134f45170df1832a982e4653a4054d53a08bf9.tar.gz pulseaudio-panda-1c134f45170df1832a982e4653a4054d53a08bf9.tar.bz2 pulseaudio-panda-1c134f45170df1832a982e4653a4054d53a08bf9.zip |
dbus: Add assertions to get rid of warnings from Coverity.
Coverity thinks that expected_method_sig can be NULL when
it's dereferenced by pa_streq(). Adding assertions doesn't
hurt here (in my opinion), and that should get rid of the
warnings.
-rw-r--r-- | src/pulsecore/protocol-dbus.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pulsecore/protocol-dbus.c b/src/pulsecore/protocol-dbus.c index 03cebc1e..adc1f38d 100644 --- a/src/pulsecore/protocol-dbus.c +++ b/src/pulsecore/protocol-dbus.c @@ -360,7 +360,7 @@ static enum find_result_t find_handler_by_method(struct call_info *call_info) { PA_HASHMAP_FOREACH(call_info->iface_entry, call_info->obj_entry->interfaces, state) { if ((call_info->method_handler = pa_hashmap_get(call_info->iface_entry->method_handlers, call_info->method))) { - call_info->expected_method_sig = pa_hashmap_get(call_info->iface_entry->method_signatures, call_info->method); + pa_assert_se(call_info->expected_method_sig = pa_hashmap_get(call_info->iface_entry->method_signatures, call_info->method)); if (pa_streq(call_info->method_sig, call_info->expected_method_sig)) return FOUND_METHOD; @@ -469,7 +469,7 @@ static enum find_result_t find_handler(struct call_info *call_info) { return NO_SUCH_INTERFACE; else if ((call_info->method_handler = pa_hashmap_get(call_info->iface_entry->method_handlers, call_info->method))) { - call_info->expected_method_sig = pa_hashmap_get(call_info->iface_entry->method_signatures, call_info->method); + pa_assert_se(call_info->expected_method_sig = pa_hashmap_get(call_info->iface_entry->method_signatures, call_info->method)); if (!pa_streq(call_info->method_sig, call_info->expected_method_sig)) return INVALID_METHOD_SIG; |