Release 5.5.35
[platform/core/system/crash-worker.git] / src / shared / config.c
index 60f168e..285c4a8 100644 (file)
@@ -53,7 +53,7 @@ enum ReportType report_type_from_str(const char *report_type_str)
        return REP_TYPE_INVALID;
 }
 
-static int config_load_exclude_paths(config_t *c, const dictionary *ini)
+static int config_load_exclude_paths(config_t *c, dictionary *ini)
 {
        assert(c);
        assert(ini);
@@ -63,16 +63,16 @@ static int config_load_exclude_paths(config_t *c, const dictionary *ini)
        if (n <= 0)
                return 0;
 
-       const char **keys = alloca(sizeof(char *) * n);
+       char **keys = alloca(sizeof(char *) * n);
        int total = n + c->n_exclude_paths;
        int n_added = 0;
 
-       c->exclude_paths = reallocarray(c->exclude_paths, sizeof(char *), total);
+       c->exclude_paths = realloc(c->exclude_paths, sizeof(char *) * total);
 
        if (!keys || !c->exclude_paths)
                goto err_oom;
 
-       keys = iniparser_getseckeys(ini, EXCLUDEPATHS_SECTION, keys);
+       keys = iniparser_getseckeys(ini, EXCLUDEPATHS_SECTION);
        if (!keys)
                goto err_oom;
 
@@ -109,7 +109,7 @@ bool config_is_path_excluded(config_t *c, const char *const path)
        return false;
 }
 
-static bool config_load_from_dict(config_t *c, const dictionary *ini)
+static bool config_load_from_dict(config_t *c, dictionary *ini)
 {
        assert(c);
        assert(ini);