summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrik Flykt <patrik.flykt@linux.intel.com>2013-01-28 17:44:31 +0200
committerPatrik Flykt <patrik.flykt@linux.intel.com>2013-01-30 10:27:25 +0200
commit77e67badd41d01cfc7631312fab57a01dc135456 (patch)
tree7478e4b7d8fe7005bfda954594cdd3bfc1ba5aaf
parentb751a5ca2b2886a3f4a08923af0a2f9a26b2d136 (diff)
downloadconnman-77e67badd41d01cfc7631312fab57a01dc135456.tar.gz
connman-77e67badd41d01cfc7631312fab57a01dc135456.tar.bz2
connman-77e67badd41d01cfc7631312fab57a01dc135456.zip
technology: Remove unnecessary comparison and goto
-rw-r--r--src/technology.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/technology.c b/src/technology.c
index 8166d17c..6f03c69d 100644
--- a/src/technology.c
+++ b/src/technology.c
@@ -119,14 +119,11 @@ int connman_technology_driver_register(struct connman_technology_driver *driver)
driver_list = g_slist_insert_sorted(driver_list, driver,
compare_priority);
- if (techless_device_list == NULL)
- goto check_rfkill;
-
/*
* Check for technology less devices if this driver
* can service any of them.
*/
- for (list = techless_device_list; list; list = list->next) {
+ for (list = techless_device_list; list != NULL; list = list->next) {
device = list->data;
type = __connman_device_get_service_type(device);
@@ -139,7 +136,6 @@ int connman_technology_driver_register(struct connman_technology_driver *driver)
__connman_technology_add_device(device);
}
-check_rfkill:
/* Check for orphaned rfkill switches. */
g_hash_table_foreach(rfkill_list, rfkill_check,
GINT_TO_POINTER(driver->type));