diff options
author | Jiwoong Im <jiwoong.im@samsung.com> | 2015-12-09 14:45:09 +0900 |
---|---|---|
committer | Jiwoong Im <jiwoong.im@samsung.com> | 2015-12-09 14:45:09 +0900 |
commit | e217faaeba616762cb1a6c168a02b2531ffadf51 (patch) | |
tree | 4b81ba54f115adfdb87f78cefbaf1f114b42c603 /src/module.c | |
parent | 7bd53513150c5f579391e1ef7c2cd898effe7218 (diff) | |
download | ui-gadget-1-e217faaeba616762cb1a6c168a02b2531ffadf51.tar.gz ui-gadget-1-e217faaeba616762cb1a6c168a02b2531ffadf51.tar.bz2 ui-gadget-1-e217faaeba616762cb1a6c168a02b2531ffadf51.zip |
Apply tizen coding rules
Change-Id: I2169875f3d6252c2b992194fd2ed1ad20079a601
Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
Diffstat (limited to 'src/module.c')
-rw-r--r-- | src/module.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/module.c b/src/module.c index c61f720..0a2dd41 100644 --- a/src/module.c +++ b/src/module.c @@ -69,17 +69,16 @@ static char *__ug_module_get_addr(const char *ug_name) snprintf(buf, sizeof(buf), "/proc/%d/maps", getpid()); file = fopen(buf, "r"); - if (file == NULL) { + if (file == NULL) { _WRN("proc open fail(%d)", errno); goto func_out; } memset(buf, 0x00, PATH_MAX); - while(fgets(buf, PATH_MAX, file) != NULL) - { + while (fgets(buf, PATH_MAX, file) != NULL) { if (strstr(buf, ug_name)) { - token_param = strtok_r(buf," ", &saveptr); + token_param = strtok_r(buf, " ", &saveptr); if ((token_param == NULL) || (strlen(token_param) > MEM_ADDR_TOT_LEN)) { _ERR("proc token param(%s) error", token_param); goto close_out; @@ -180,9 +179,9 @@ static int __get_ug_info(const char* name, char** ug_file_path) out_func: ret = 0; - if ((strlen(ug_file) > 0) && (ug_file_path)) { + if ((strlen(ug_file) > 0) && (ug_file_path)) *ug_file_path = strdup(ug_file); - } + return ret; err_func: |