From: Ji-hoon Lee Date: Wed, 11 Aug 2021 06:20:50 +0000 (+0900) Subject: Fix defects detected by static analysis tool X-Git-Tag: accepted/tizen/unified/20210813.005937^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F51%2F262451%2F1;p=platform%2Fcore%2Fuifw%2Fmulti-assistant-service.git Fix defects detected by static analysis tool Change-Id: I31b8d14b703b4e86693fe5dbbcae98f004380848 --- diff --git a/src/package_update_monitor.cpp b/src/package_update_monitor.cpp index db2d16e..112fff8 100644 --- a/src/package_update_monitor.cpp +++ b/src/package_update_monitor.cpp @@ -73,7 +73,7 @@ static bool is_wakeup_engine(const pkgmgrinfo_appinfo_h handle, CPackageUpdateMo if (PMINFO_R_OK == ret && NULL != appid) { for (int loop = 0; loop < MAX_MACLIENT_INFO_NUM;loop++) { if (clientInfo.getItems()[loop].used) { - for (int inner_loop; inner_loop < MAX_WAKEUP_ENGINES_NUM;inner_loop++) { + for (int inner_loop = 0;inner_loop < MAX_WAKEUP_ENGINES_NUM;inner_loop++) { LOGD("comparing appid : %s %s", clientInfo.getItems()[loop].wakeup_engine[inner_loop], appid); if (0 == strncmp(clientInfo.getItems()[loop].wakeup_engine[inner_loop], appid, MAX_APPID_LEN)) { is_wakeup_engine = true; diff --git a/src/service_main.cpp b/src/service_main.cpp index 8d0d1d2..ac25d36 100644 --- a/src/service_main.cpp +++ b/src/service_main.cpp @@ -1248,7 +1248,7 @@ bool CServiceMain::is_valid_wakeup_engine(const char* appid) for (int loop = 0; loop < MAX_MACLIENT_INFO_NUM;loop++) { ClientInfoItems *items = mClientInfo.getItems(); if (items[loop].used) { - for (int inner_loop; inner_loop < MAX_WAKEUP_ENGINES_NUM;inner_loop++) { + for (int inner_loop = 0;inner_loop < MAX_WAKEUP_ENGINES_NUM;inner_loop++) { LOGD("comparing appid : %s %s", items[loop].wakeup_engine[inner_loop], appid); if (0 == strncmp(items[loop].wakeup_engine[inner_loop], appid, MAX_APPID_LEN)) { return true;