diff options
author | Kyungwook Tak <k.tak@samsung.com> | 2016-07-18 11:28:53 +0900 |
---|---|---|
committer | Kyungwook Tak <k.tak@samsung.com> | 2016-07-18 13:54:57 +0900 |
commit | f72179753846682e783bbc4dbe1a3a570e7fac23 (patch) | |
tree | 792927dbc3307914f6f45b24a1f3a019e5166c9b /srcs/wae_initializer.c | |
parent | 25dec26957850ba42687ffff35fc226039405654 (diff) | |
download | libwebappenc-f72179753846682e783bbc4dbe1a3a570e7fac23.tar.gz libwebappenc-f72179753846682e783bbc4dbe1a3a570e7fac23.tar.bz2 libwebappenc-f72179753846682e783bbc4dbe1a3a570e7fac23.zip |
Fix C code naming rules & minor fixes
- Remove some goto label which isn't needed
- Change 'num' param of strncmp / strncpy with meaningful value
(static buffer's size)
- Add const to unsigned char array input param
- Change param names (c string array and raw buffer array)
const char *pPkgId -> pkgId
unsigned char *pDek -> dek
unsigned char **ppDek -> pDek
- Change all camel naminges to underbar
- Remove null checking before call free()
free() does nothing if ptr is null pointer.
(refer: http://linux.die.net/man/3/free)
- Add missing closedir() after opendir()
Change-Id: I7e5888ed3dc77e5355cfc441f10dc0d6d916921c
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Diffstat (limited to 'srcs/wae_initializer.c')
-rw-r--r-- | srcs/wae_initializer.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/srcs/wae_initializer.c b/srcs/wae_initializer.c index b9d7ce8..956b04d 100644 --- a/srcs/wae_initializer.c +++ b/srcs/wae_initializer.c @@ -23,25 +23,19 @@ #include "web_app_enc.h" #include "wae_log.h" -#include <stdio.h> - int main(int argc, char *argv[]) { - int ret = WAE_ERROR_NONE; bool reload = false; - if (argc == 2 && strcmp(argv[1], "--reload") == 0) { + if (argc == 2 && strcmp(argv[1], "--reload") == 0) reload = true; - } - ret = load_preloaded_app_deks(reload); + int ret = load_preloaded_app_deks(reload); if (ret == WAE_ERROR_NONE) { - printf("WAE INITIALIZER was finished successfully.\n"); WAE_SLOGI("WAE INITIALIZER was finished successfully."); return 0; } else { - printf("WAE INITIALIZER was finished with error. ret=%d\n", ret); WAE_SLOGE("WAE INITIALIZER was finished with error. ret=%d", ret); return -1; } |