config: Avoid create_config forward declaration
authorSamuel Ortiz <sameo@linux.intel.com>
Fri, 8 Apr 2011 15:44:01 +0000 (17:44 +0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Mon, 11 Apr 2011 10:02:43 +0000 (12:02 +0200)
src/config.c

index 17ed7d1..22a4704 100644 (file)
@@ -317,22 +317,6 @@ static int load_service(GKeyFile *keyfile, const char *group,
        return 0;
 }
 
-static struct connman_config *create_config(const char *ident);
-
-int __connman_config_load_service(GKeyFile *keyfile, const char *group)
-{
-       struct connman_config *config = g_hash_table_lookup(config_table,
-                                                       NONFS_CONFIG_NAME);
-
-       if (config == NULL) {
-               config = create_config(NONFS_CONFIG_NAME);
-               if (config == NULL)
-                       return -ENOMEM;
-       }
-
-       return load_service(keyfile, group, config);
-}
-
 static int load_config(struct connman_config *config)
 {
        GKeyFile *keyfile;
@@ -401,6 +385,20 @@ static struct connman_config *create_config(const char *ident)
        return config;
 }
 
+int __connman_config_load_service(GKeyFile *keyfile, const char *group)
+{
+       struct connman_config *config = g_hash_table_lookup(config_table,
+                                                       NONFS_CONFIG_NAME);
+
+       if (config == NULL) {
+               config = create_config(NONFS_CONFIG_NAME);
+               if (config == NULL)
+                       return -ENOMEM;
+       }
+
+       return load_service(keyfile, group, config);
+}
+
 static int read_configs(void)
 {
        GDir *dir;