Fix wrong type 35/238335/1
authorHwankyu Jhun <h.jhun@samsung.com>
Mon, 13 Jul 2020 02:18:42 +0000 (11:18 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Mon, 13 Jul 2020 02:22:07 +0000 (11:22 +0900)
gboolean is the integer. The size of gboolean is 4 bytes.
The size of bool is 1 byte.

Change-Id: Ic2b515cff24cd0e27d011b573e0764b1c0607e12
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
lib/alarm-lib-dbus.c

index a23da20..0bb2c51 100644 (file)
@@ -910,6 +910,7 @@ bool _send_alarm_get_global(alarm_context_t context, const alarm_id_t alarm_id,
        int return_code = -1;
        GVariant *param = NULL;
        GVariant *reply = NULL;
+       gboolean is_global = FALSE;
 
        param = g_variant_new("(i)", alarm_id);
 
@@ -921,7 +922,8 @@ bool _send_alarm_get_global(alarm_context_t context, const alarm_id_t alarm_id,
                return false;
        }
 
-       g_variant_get(reply, "(bi)", global, &return_code);
+       g_variant_get(reply, "(bi)", &is_global, &return_code);
+       *global = is_global ? true : false;
 
        LOGD("alarm_get_global dbus sync() success. alarm_id[%d], global[%d]\
                        return_code[%d]", alarm_id, *global, return_code);