[PATCH BlueZ 2/5] scanparam: Remove unnecessary assignment

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"scan" will be g_free()'d on this same function, so no need to assign 0
to refresh_cb_id.
---
 profiles/scanparam/scan.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/profiles/scanparam/scan.c b/profiles/scanparam/scan.c
index 0ad2e17..0f83f8f 100644
--- a/profiles/scanparam/scan.c
+++ b/profiles/scanparam/scan.c
@@ -239,10 +239,8 @@ static void scan_param_remove(struct btd_service *service)
 {
 	struct scan *scan = btd_service_get_user_data(service);
 
-	if (scan->refresh_cb_id) {
+	if (scan->refresh_cb_id)
 		g_attrib_unregister(scan->attrib, scan->refresh_cb_id);
-		scan->refresh_cb_id = 0;
-	}
 
 	btd_device_remove_attio_callback(scan->device, scan->attioid);
 	btd_device_unref(scan->device);
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux