Diff between a106074fe5cbad533b27bf7729982f3ef4c3202f and 62778f4d665b73f7da42cfd56004cb80da054ff4

Changed Files

File Additions Deletions Status
profiles/proximity/monitor.c +16 -8 modified

Full Patch

diff --git a/profiles/proximity/monitor.c b/profiles/proximity/monitor.c
index 370592d..e502605 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;