From f72179753846682e783bbc4dbe1a3a570e7fac23 Mon Sep 17 00:00:00 2001 From: Kyungwook Tak Date: Mon, 18 Jul 2016 11:28:53 +0900 Subject: 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 --- srcs/wae_initializer.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'srcs/wae_initializer.c') 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 - 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; } -- cgit v1.2.3