mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -05:00
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.
This commit is contained in:
parent
8747930747
commit
1c134f4517
1 changed files with 2 additions and 2 deletions
|
|
@ -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) {
|
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))) {
|
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))
|
if (pa_streq(call_info->method_sig, call_info->expected_method_sig))
|
||||||
return FOUND_METHOD;
|
return FOUND_METHOD;
|
||||||
|
|
@ -469,7 +469,7 @@ static enum find_result_t find_handler(struct call_info *call_info) {
|
||||||
return NO_SUCH_INTERFACE;
|
return NO_SUCH_INTERFACE;
|
||||||
|
|
||||||
else if ((call_info->method_handler = pa_hashmap_get(call_info->iface_entry->method_handlers, call_info->method))) {
|
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))
|
if (!pa_streq(call_info->method_sig, call_info->expected_method_sig))
|
||||||
return INVALID_METHOD_SIG;
|
return INVALID_METHOD_SIG;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue