Fix static issues 73/267273/1
authorChanggyu Choi <changyu.choi@samsung.com>
Wed, 1 Dec 2021 00:53:46 +0000 (09:53 +0900)
committerChanggyu Choi <changyu.choi@samsung.com>
Wed, 1 Dec 2021 00:53:46 +0000 (09:53 +0900)
Changes:
 - Add to check return value of __send_app_request()

Change-Id: Ie3b289da7f078212537d6a4e6149e003cd2ca0ab
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
src/lib/amd_launch.c

index 2d8440e..78152cf 100644 (file)
@@ -921,14 +921,22 @@ static int __compare_signature(const struct appinfo *ai, int cmd,
 
 static void __prepare_to_suspend(int pid, uid_t uid)
 {
+       int ret;
+
        SECURE_LOGD("[__SUSPEND__] pid: %d, uid: %d", pid, uid);
-       __send_app_request(pid, uid, APP_SUSPEND, -1, NULL);
+       ret = __send_app_request(pid, uid, APP_SUSPEND, -1, NULL);
+       if (ret < 0)
+               _E("Failed to send suspend request (%d)", ret);
 }
 
 static void __prepare_to_wake_services(int pid, uid_t uid)
 {
+       int ret;
+
        SECURE_LOGD("[__SUSPEND__] pid: %d, uid: %d", pid, uid);
-       __send_app_request(pid, uid, APP_WAKE, -1, NULL);
+       ret = __send_app_request(pid, uid, APP_WAKE, -1, NULL);
+       if (ret < 0)
+               _E("Failed to send wake request (%d)", ret);
 }
 
 static gboolean __check_service_only(gpointer user_data)