utils-dbus: fix un initialised status
authorJosé Bollo <jose.bollo@iot.bzh>
Tue, 26 Jan 2016 16:04:27 +0000 (17:04 +0100)
committerJosé Bollo <jose.bollo@iot.bzh>
Thu, 4 Feb 2016 14:47:01 +0000 (15:47 +0100)
Change-Id: I6384b88ee60530d44c01f98022b43976eb212bfc
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
src/utils-jbus.c

index e379921..1f85a4c 100644 (file)
@@ -268,7 +268,9 @@ static DBusHandlerResult incoming_resp(DBusConnection *connection, DBusMessage *
        *prv = jrw->next;
 
        /* retrieve the string value */
-       if (!dbus_message_get_args(message, NULL, DBUS_TYPE_STRING, &str, DBUS_TYPE_INVALID)) {
+       if (dbus_message_get_args(message, NULL, DBUS_TYPE_STRING, &str, DBUS_TYPE_INVALID))
+               status = 0;
+       else {
                status = -1;
                str = NULL;
                reply = NULL;