summaryrefslogtreecommitdiff
path: root/src/libsystem/config-parser.c
diff options
context:
space:
mode:
authorWaLyong Cho <walyong.cho@samsung.com>2016-12-14 20:12:56 +0900
committerWaLyong Cho <walyong.cho@samsung.com>2016-12-14 20:12:56 +0900
commitf2bbea8b404d188528cbfcef0b40e7b7d9017f58 (patch)
tree6414f82b8dc6ea9b3ff95cc90db7903b8358174e /src/libsystem/config-parser.c
parent26e7c65878e00c2c99d2bd6700780ce2a75450d8 (diff)
parent5c270d17bd9ccd98cad2f5a84c0d1932d3f067f1 (diff)
downloadlibsystem-f2bbea8b404d188528cbfcef0b40e7b7d9017f58.tar.gz
libsystem-f2bbea8b404d188528cbfcef0b40e7b7d9017f58.tar.bz2
libsystem-f2bbea8b404d188528cbfcef0b40e7b7d9017f58.zip
release: 4.1-0
[Model] Common [BinType] AP [Customer] N/A [Issue] N/A [Request] N/A [Occurrence Version] N/A [Problem] release: 4.1-0 [Cause & Measure] N/A [Checking Method] N/A [Team] SystemFW [Developer] WaLyong Cho [Solution company] Samsung [Change Type] N/A * devel/systemfw/master: release: 4.1-0 configure.ac: add needed build prog and headers libsystem: glib-utils: extend glist iterate macro function libsystem: add general numeric type read/write api. libsystem: add macro function for num read/write adjust line break and white spaces configure.ac: remove duplicate space in build flags untabify: replace tab to space libsystem: add 64 bit signed/unsigned read-write api Change-Id: Ia36e4a330b8d5cab3111f8d7500cb2be959f2882 Signed-off-by: WaLyong Cho <walyong.cho@samsung.com>
Diffstat (limited to 'src/libsystem/config-parser.c')
-rw-r--r--src/libsystem/config-parser.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/libsystem/config-parser.c b/src/libsystem/config-parser.c
index e6ade0e..2799f0a 100644
--- a/src/libsystem/config-parser.c
+++ b/src/libsystem/config-parser.c
@@ -103,9 +103,7 @@ static int config_parse_table(
return 0;
}
-int config_parse(
- const char *filename,
- void *table) {
+int config_parse(const char *filename, void *table) {
_cleanup_fclose_ FILE *f = NULL;
char *sections[MAX_SECTION] = { 0 };
@@ -140,12 +138,12 @@ int config_parse(
if (*l == '[') {
len = strlen(l);
- if (l[len-1] != ']') {
+ if (l[len - 1] != ']') {
r = -EBADMSG;
goto finish;
}
- n = strndup(l+1, len-2);
+ n = strndup(l + 1, len - 2);
if (!n) {
r = -ENOMEM;
goto finish;
@@ -203,7 +201,7 @@ int config_parse(
r = 0;
finish:
- for (i=0; i<num_section; i++)
+ for (i = 0; i < num_section; i++)
if (sections[i])
free(sections[i]);