return -ENOSYS;
config = g_hash_table_lookup(config_table, ident);
- if(config != NULL) {
+ if (config != NULL) {
GHashTableIter iter;
gpointer value, key;
gboolean found = FALSE;
if (file != NULL && entry != NULL) {
while (g_hash_table_iter_next(&iter, &key,
&value) == TRUE) {
- struct connman_config_service *config = value;
-
- if (g_strcmp0(config->config_ident,
- file) == 0 &&
- g_strcmp0(config->config_entry,
- entry) == 0) {
- found = TRUE;
- break;
- }
+ struct connman_config_service *config_service;
+
+ config_service = value;
+
+ if (g_strcmp0(config_service->config_ident,
+ file) != 0)
+ continue;
+
+ if (g_strcmp0(config_service->config_entry,
+ entry) != 0)
+ continue;
+
+ found = TRUE;
+ break;
}
DBG("found %d ident %s file %s entry %s", found, ident,