From 62778f4d665b73f7da42cfd56004cb80da054ff4 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Sat, 29 Dec 2012 21:29:42 -0800 Subject: [PATCH] proximity: The function g_dbus_pending_property_error has no return value --- profiles/proximity/monitor.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/profiles/proximity/monitor.c b/profiles/proximity/monitor.c index 370592dfa..e502605d6 100644 --- a/profiles/proximity/monitor.c +++ b/profiles/proximity/monitor.c @@ -420,17 +420,21 @@ static void property_set_link_loss_level(const GDBusPropertyTable *property, struct monitor *monitor = data; const char *level; - if (dbus_message_iter_get_arg_type(iter) != DBUS_TYPE_STRING) - return g_dbus_pending_property_error(id, + if (dbus_message_iter_get_arg_type(iter) != DBUS_TYPE_STRING) { + g_dbus_pending_property_error(id, ERROR_INTERFACE ".InvalidArguments", "Invalid arguments in method call"); + return; + } dbus_message_iter_get_basic(iter, &level); - if (!level_is_valid(level)) - return g_dbus_pending_property_error(id, + if (!level_is_valid(level)) { + g_dbus_pending_property_error(id, ERROR_INTERFACE ".InvalidArguments", "Invalid arguments in method call"); + return; + } if (g_strcmp0(monitor->linklosslevel, level) == 0) goto done; @@ -478,17 +482,21 @@ static void property_set_immediate_alert_level( struct btd_device *device = monitor->device; const char *level; - if (dbus_message_iter_get_arg_type(iter) != DBUS_TYPE_STRING) - return g_dbus_pending_property_error(id, + if (dbus_message_iter_get_arg_type(iter) != DBUS_TYPE_STRING) { + g_dbus_pending_property_error(id, ERROR_INTERFACE ".InvalidArguments", "Invalid arguments in method call"); + return; + } dbus_message_iter_get_basic(iter, &level); - if (!level_is_valid(level)) - return g_dbus_pending_property_error(id, + if (!level_is_valid(level)) { + g_dbus_pending_property_error(id, ERROR_INTERFACE ".InvalidArguments", "Invalid arguments in method call"); + return; + } if (g_strcmp0(monitor->immediatelevel, level) == 0) goto done; -- 2.47.3