From 5e8e3be7d49d452e25b705924b22765a81775d61 Mon Sep 17 00:00:00 2001 From: Suchang Woo Date: Tue, 22 Dec 2015 08:06:18 +0900 Subject: [PATCH] common: fix coding style Change-Id: If8d54a5f380a62c18db6609200bbcc1373614509 Signed-off-by: Suchang Woo --- example/set_async.c | 8 ++++---- example/set_sync.c | 8 ++++---- vconf-compat/vconf.c | 10 +++++----- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/example/set_async.c b/example/set_async.c index a407a0d..6a93a8c 100644 --- a/example/set_async.c +++ b/example/set_async.c @@ -92,13 +92,13 @@ static struct buxton_value *arg_to_val(const char *atype, const char *arg) val = buxton_value_create_double(d); break; case BUXTON_TYPE_BOOLEAN: - if (!strcasecmp(arg, "true")) { + if (!strcasecmp(arg, "true")) b = 1; - } else if (!strcasecmp(arg, "false")) { + else if (!strcasecmp(arg, "false")) b = 0; - } else { + else b = strtol(arg, NULL, 0); - } + printf("Boolean [%s]\n", b ? "True" : "False"); val = buxton_value_create_boolean(b); break; diff --git a/example/set_sync.c b/example/set_sync.c index 50842e2..a5e9948 100644 --- a/example/set_sync.c +++ b/example/set_sync.c @@ -91,13 +91,13 @@ static struct buxton_value *arg_to_val(const char *atype, const char *arg) val = buxton_value_create_double(d); break; case BUXTON_TYPE_BOOLEAN: - if (!strcasecmp(arg, "true")) { + if (!strcasecmp(arg, "true")) b = 1; - } else if (!strcasecmp(arg, "false")) { + else if (!strcasecmp(arg, "false")) b = 0; - } else { + else b = strtol(arg, NULL, 0); - } + printf("Boolean [%s]\n", b ? "True" : "False"); val = buxton_value_create_boolean(b); break; diff --git a/vconf-compat/vconf.c b/vconf-compat/vconf.c index 3b52081..78390f3 100644 --- a/vconf-compat/vconf.c +++ b/vconf-compat/vconf.c @@ -869,7 +869,7 @@ EXPORT int vconf_keylist_add_bool(keylist_t *keylist, } EXPORT int vconf_keylist_add_dbl(keylist_t *keylist, - const char *keyname, double value) + const char *keyname, double value) { struct _keynode_t *keynode; @@ -892,7 +892,7 @@ EXPORT int vconf_keylist_add_dbl(keylist_t *keylist, } EXPORT int vconf_keylist_add_str(keylist_t *keylist, - const char *keyname, const char *value) + const char *keyname, const char *value) { struct _keynode_t *keynode; char *s; @@ -930,7 +930,7 @@ EXPORT int vconf_keylist_del(keylist_t *keylist, const char *keyname) return -1; } - keynode= find_keynode(keylist, keyname); + keynode = find_keynode(keylist, keyname); if (!keynode) { errno = ENOENT; return -1; @@ -1031,7 +1031,7 @@ static struct _keynode_t *alloc_keynode(struct buxton_layer *layer, } EXPORT int vconf_get(keylist_t *keylist, - const char *in_parentDIR, get_option_t option) + const char *in_parentDIR, get_option_t option) { int r; char **names; @@ -1131,7 +1131,7 @@ EXPORT int vconf_set(keylist_t *keylist) } EXPORT int vconf_keylist_lookup(keylist_t *keylist, const char *keyname, - keynode_t **return_node) + keynode_t **return_node) { struct _keynode_t *keynode; -- 2.7.4