summaryrefslogtreecommitdiff
path: root/src/config.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2012-07-15 19:51:11 -0300
committerMarcel Holtmann <marcel@holtmann.org>2012-07-15 19:51:11 -0300
commit3d7b5de4ecbf623104ac87ab46b4d67cc987e400 (patch)
tree0ca40d6fa8d011dc8e26f10022ef2cf9bc09cd9f /src/config.c
parent49b322ca163610bd72b76d22b9fe55e3fbaf64cb (diff)
downloadconnman-3d7b5de4ecbf623104ac87ab46b4d67cc987e400.tar.gz
connman-3d7b5de4ecbf623104ac87ab46b4d67cc987e400.tar.bz2
connman-3d7b5de4ecbf623104ac87ab46b4d67cc987e400.zip
config: Avoid shadowing config structure variable
Diffstat (limited to 'src/config.c')
-rw-r--r--src/config.c25
1 files changed, 15 insertions, 10 deletions
diff --git a/src/config.c b/src/config.c
index c7ab1d60..a3296743 100644
--- a/src/config.c
+++ b/src/config.c
@@ -904,7 +904,7 @@ int __connman_config_provision_service_ident(struct connman_service *service,
return -ENOSYS;
config = g_hash_table_lookup(config_table, ident);
- if(config != NULL) {
+ if (config != NULL) {
GHashTableIter iter;
gpointer value, key;
gboolean found = FALSE;
@@ -918,15 +918,20 @@ int __connman_config_provision_service_ident(struct connman_service *service,
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,