Fix checking return code app2sd API 06/205606/4
authorSangyoon Jang <jeremy.jang@samsung.com>
Wed, 8 May 2019 04:38:12 +0000 (13:38 +0900)
committerSangyoon Jang <jeremy.jang@samsung.com>
Fri, 10 May 2019 05:56:36 +0000 (05:56 +0000)
It may return positive return value in case of error.

Change-Id: Ic40cd8241d3fb1dd4deba3f67ac94343b16065c8
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
src/common/app2ext_dynamic_service.cc

index 525a22e..ab1318f 100644 (file)
@@ -39,7 +39,7 @@ App2ExtDynamicService::~App2ExtDynamicService() {
 bool App2ExtDynamicService::EnableExternalPkgForUsr(const char* appname,
     uid_t uid) {
   int ret = CallMethod<int>(-1, enable_pkg_sym_name.c_str(), appname, uid);
-  if (ret < 0) {
+  if (ret) {
     LOG(ERROR) << enable_pkg_sym_name << " failed with error code: "
                << ret;
   }
@@ -49,7 +49,7 @@ bool App2ExtDynamicService::EnableExternalPkgForUsr(const char* appname,
 bool App2ExtDynamicService::DisableExternalPkgForUsr(const char* appname,
     uid_t uid) {
   int ret = CallMethod<int>(-1, disable_pkg_sym_name.c_str(), appname, uid);
-  if (ret < 0) {
+  if (ret) {
     LOG(ERROR) << disable_pkg_sym_name << " failed with error code: "
                << ret;
   }