OSDN Git Service

scanparam: Remove unnecessary assignment
authorAnderson Lizardo <anderson.lizardo@openbossa.org>
Mon, 29 Jul 2013 13:59:29 +0000 (09:59 -0400)
committerJohan Hedberg <johan.hedberg@intel.com>
Tue, 30 Jul 2013 09:50:43 +0000 (12:50 +0300)
"scan" will be g_free()'d on this same function, so no need to assign 0
to refresh_cb_id.

profiles/scanparam/scan.c

index 0ad2e17..0f83f8f 100644 (file)
@@ -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);