From: Ilho Kim Date: Wed, 14 Aug 2024 01:07:08 +0000 (+0900) Subject: Remove the possibility variable not be initialized X-Git-Tag: accepted/tizen/unified/20240814.180403~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0ceae2b8267e82410fab1f9a71a75cc0a1536e80;p=platform%2Fcore%2Fappfw%2Fpkgmgr-tool.git Remove the possibility variable not be initialized Change-Id: I6e1d389dbb73088cc425731fe031b7d4bf7f1e24 --- diff --git a/src/pkgcmd/pkg_cmd.c b/src/pkgcmd/pkg_cmd.c index a55c949..480583e 100644 --- a/src/pkgcmd/pkg_cmd.c +++ b/src/pkgcmd/pkg_cmd.c @@ -1681,24 +1681,20 @@ static int __unregister_update_info_req_dispatcher(pm_tool_args *data, uid_t tar if (data->update_info_type == 0) { ret = pkgmgr_client_usr_unregister_pkg_update_info(pc, data->pkgid, target_uid); - if (ret < 0) { + if (ret < 0) printf("unregister pkg update info failed : %d[%s]\n", ret, data->pkgid); - pkgmgr_client_free(pc); - return ret; - } } else if (data->update_info_type == 1) { ret = pkgmgr_client_usr_unregister_all_pkg_update_info(pc, target_uid); - if (ret < 0) { + if (ret < 0) printf("unregister all pkg update info failed : %d\n", ret); - pkgmgr_client_free(pc); - return ret; - } + } else { + printf("Unknown update info type (%d)", data->update_info_type); + ret = -1; } - printf("unregister pkg update info ret: %d\n", ret); pkgmgr_client_free(pc); - return 0; + return ret; } static int __uninstall_resource_req_dispatcher(pm_tool_args *data, uid_t target_uid)