From a5e1be914ba5480f9eae7ab9dc31e30524f74182 Mon Sep 17 00:00:00 2001 From: Claudio Takahasi Date: Mon, 20 Sep 2010 12:00:17 -0300 Subject: Fix uninitialised value warning --- attrib/client.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'attrib') diff --git a/attrib/client.c b/attrib/client.c index 265625e0..d695e235 100644 --- a/attrib/client.c +++ b/attrib/client.c @@ -415,11 +415,6 @@ static DBusMessage *register_watcher(DBusConnection *conn, GIOChannel *io; char *path; - if (gatt->attrib != NULL) { - gatt->attrib = g_attrib_ref(gatt->attrib); - goto done; - } - if (!dbus_message_get_args(msg, NULL, DBUS_TYPE_OBJECT_PATH, &path, DBUS_TYPE_INVALID)) return NULL; @@ -428,6 +423,11 @@ static DBusMessage *register_watcher(DBusConnection *conn, return g_dbus_create_error(msg, ERROR_INTERFACE ".Failed", "Invalid path"); + if (gatt->attrib != NULL) { + gatt->attrib = g_attrib_ref(gatt->attrib); + goto done; + } + /* * FIXME: If the service doesn't support Client Characteristic * Configuration it is necessary to poll the server from time -- cgit