diff options
author | Claudio Takahasi <claudio.takahasi@openbossa.org> | 2010-09-20 12:00:17 -0300 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2010-09-22 22:34:27 +0300 |
commit | a5e1be914ba5480f9eae7ab9dc31e30524f74182 (patch) | |
tree | 5775281a4330e1f663f5a2c5ab89ab99853caa20 /attrib | |
parent | 27be80c8048dc12415de7982e58771971f5a4cc9 (diff) | |
download | bluez-a5e1be914ba5480f9eae7ab9dc31e30524f74182.tar.gz bluez-a5e1be914ba5480f9eae7ab9dc31e30524f74182.tar.xz bluez-a5e1be914ba5480f9eae7ab9dc31e30524f74182.zip |
Fix uninitialised value warning
Diffstat (limited to 'attrib')
-rw-r--r-- | attrib/client.c | 10 |
1 files changed, 5 insertions, 5 deletions
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 |