OSDN Git Service

Fix bogus error comparison
authorJohan Hedberg <johan.hedberg@nokia.com>
Tue, 21 Jul 2009 08:50:39 +0000 (11:50 +0300)
committerJohan Hedberg <johan.hedberg@nokia.com>
Tue, 21 Jul 2009 08:50:54 +0000 (11:50 +0300)
There's no "error" variable here so the comparison was always with the
address of the public error function, which will always be != NULL.

src/dbus-common.c

index d06d8e5..059c91c 100644 (file)
@@ -171,7 +171,7 @@ int hcid_dbus_init(void)
 
        conn = g_dbus_setup_bus(DBUS_BUS_SYSTEM, BLUEZ_NAME, &err);
        if (!conn) {
-               if (error != NULL && dbus_error_is_set(&err)) {
+               if (dbus_error_is_set(&err)) {
                        dbus_error_free(&err);
                        return -EIO;
                }