Fix static analysis issue 30/317430/1
authorSangyoon Jang <jeremy.jang@samsung.com>
Tue, 10 Sep 2024 07:01:40 +0000 (16:01 +0900)
committerSangyoon Jang <jeremy.jang@samsung.com>
Tue, 10 Sep 2024 07:01:40 +0000 (16:01 +0900)
Change-Id: I6e9aba07c43153e4bc2dabf9e260d4338bb05233
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
src/pkgcmd/pkg_cmd.c

index 480583ec852c303be68cb6b8113c3e0d867c4f08..089b4023884a1f1ece116ae6d90c1885748e215b 100644 (file)
@@ -1645,10 +1645,8 @@ static int __register_update_info_req_dispatcher(pm_tool_args *data, uid_t targe
        }
 
        info.pkgid = data->pkgid;
-       for (GList *list = data->pkgs; list; list = list->next) {
-                       info.version = (char *)list->data;
-                       break;
-       }
+       /* temporarily using multiple args to handle version value */
+       info.version = (char *)data->pkgs->data;
        info.type = data->update_info_type;
 
        ret = pkgmgr_client_usr_register_pkg_update_info(pc, &info, target_uid);