gdbus: Remove not needed NULL pointer checks
authorSzymon Janc <szymon.janc@tieto.com>
Wed, 21 Nov 2012 10:21:03 +0000 (11:21 +0100)
committerMarcel Holtmann <marcel@holtmann.org>
Mon, 26 Nov 2012 11:59:48 +0000 (12:59 +0100)
g_strdup returns NULL if argument passed is NULL and there is no need
to double check that.

gdbus/watch.c

index 07feb61..1cd1211 100644 (file)
@@ -240,8 +240,8 @@ proceed:
        data = g_new0(struct filter_data, 1);
 
        data->connection = dbus_connection_ref(connection);
-       data->name = name ? g_strdup(name) : NULL;
-       data->owner = owner ? g_strdup(owner) : NULL;
+       data->name = g_strdup(name);
+       data->owner = g_strdup(owner);
        data->path = g_strdup(path);
        data->interface = g_strdup(interface);
        data->member = g_strdup(member);