Fix Coverity in request_haptic_method() 89/268789/1
authorHyotaek Shim <hyotaek.shim@samsung.com>
Mon, 3 Jan 2022 04:14:42 +0000 (13:14 +0900)
committerHyotaek Shim <hyotaek.shim@samsung.com>
Mon, 3 Jan 2022 03:53:59 +0000 (03:53 +0000)
Declaring variable reply_val without initializer.

Change-Id: I6ed79e09bc9e84333583afdace2576ae7bf2d44c
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
src/auto-test/haptic.c

index 101f8da..49cd1ef 100644 (file)
@@ -30,7 +30,7 @@
 static bool request_haptic_method(const char *method, GVariant *param, int *out_val)
 {
        GVariant *reply;
-       int reply_val, ret_dbus;
+       int reply_val = 0, ret_dbus;
        bool ret = FALSE;
 
        ret_dbus = gdbus_call_sync_with_reply(VIBRATOR_BUS_NAME,