projects
/
platform
/
core
/
system
/
stability-monitor.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2c6e128
)
Load configs in lexicographic order
66/214366/1
author
Konrad Kuchciak
<k.kuchciak@samsung.com>
Fri, 20 Sep 2019 13:54:31 +0000
(15:54 +0200)
committer
Konrad Kuchciak
<k.kuchciak@samsung.com>
Fri, 20 Sep 2019 13:54:31 +0000
(15:54 +0200)
Change-Id: I6c2d8442e2a50c5fcf93ee351dd9d99cc242c4c0
src/config.c
patch
|
blob
|
history
diff --git
a/src/config.c
b/src/config.c
index d792c17d048ead3736874f1921cfd91e73018056..3287b6299e1c4a2cacc45bdc5affd88755d1cd6d 100644
(file)
--- a/
src/config.c
+++ b/
src/config.c
@@
-97,13
+97,13
@@
int config_load_dir(const char *config_dir)
return n;
}
-
while (n--
) {
- snprintf(full_path, PATH_MAX, "%s/%s", config_dir, filelist[
n
]->d_name);
+
for (int i = 0; i < n; i++
) {
+ snprintf(full_path, PATH_MAX, "%s/%s", config_dir, filelist[
i
]->d_name);
if (is_regular_file(full_path))
config_load_merge(full_path);
- free(filelist[
n
]);
+ free(filelist[
i
]);
}
free(filelist);