return NULL;
}
- if (!data->introspect)
+ if (data->introspect == NULL)
generate_introspection_xml(connection, data,
dbus_message_get_path(message));
reply = dbus_message_new_method_return(message);
- if (!reply)
+ if (reply == NULL)
return NULL;
dbus_message_append_args(reply, DBUS_TYPE_STRING, &data->introspect,
{
GSList *list;
- if (!name)
+ if (name == NULL)
return NULL;
for (list = interfaces; list; list = list->next) {
interface = dbus_message_get_interface(message);
iface = find_interface(data->interfaces, interface);
- if (!iface)
+ if (iface == NULL)
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
for (method = iface->methods; method &&
parent_path = g_strdup(child_path);
slash = strrchr(parent_path, '/');
- if (!slash)
+ if (slash == NULL)
goto done;
if (slash == parent_path && parent_path[1] != '\0')
goto done;
}
- if (!data)
+ if (data == NULL)
goto done;
g_free(data->introspect);
struct interface_data *iface;
iface = find_interface(data->interfaces, name);
- if (!iface)
+ if (iface == NULL)
return FALSE;
data->interfaces = g_slist_remove(data->interfaces, iface);
*args = NULL;
if (!dbus_connection_get_object_path_data(conn, path,
- (void *) &data) || !data) {
+ (void *) &data) || data == NULL) {
error("dbus_connection_emit_signal: path %s isn't registered",
path);
return FALSE;
}
iface = find_interface(data->interfaces, interface);
- if (!iface) {
+ if (iface == NULL) {
error("dbus_connection_emit_signal: %s does not implement %s",
path, interface);
return FALSE;
}
}
- if (!*args) {
+ if (*args == NULL) {
error("No signal named %s on interface %s", name, interface);
return FALSE;
}
return FALSE;
signal = dbus_message_new_signal(path, interface, name);
- if (!signal) {
+ if (signal == NULL) {
error("Unable to allocate new %s.%s signal", interface, name);
return FALSE;
}
{
struct generic_data *data = NULL;
- if (!path)
+ if (path == NULL)
return FALSE;
if (dbus_connection_get_object_path_data(connection, path,
struct filter_data *data;
const char *name = NULL, *owner = NULL;
- if (!filter_data_find(connection, NULL, NULL, NULL, NULL, NULL,
- NULL)) {
+ if (filter_data_find(connection, NULL, NULL, NULL, NULL, NULL, NULL) == NULL) {
if (!dbus_connection_add_filter(connection,
message_filter, NULL, NULL)) {
error("dbus_connection_add_filter() failed");
/* Remove filter if there are no listeners left for the connection */
data = filter_data_find(connection, NULL, NULL, NULL, NULL, NULL,
NULL);
- if (!data)
+ if (data == NULL)
dbus_connection_remove_filter(connection, message_filter,
NULL);
/* Only auto remove if it is a bus name watch */
if (data->argument[0] == ':' &&
- (!cb->conn_func || !cb->disc_func)) {
+ (cb->conn_func == NULL || cb->disc_func == NULL)) {
filter_data_remove_callback(data, cb);
continue;
}
/* Sender is always bus name */
data = filter_data_find(connection, NULL, sender, path, iface, member,
arg);
- if (!data) {
+ if (data == NULL) {
error("Got %s.%s signal which has no listeners", iface, member);
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
}
/* Remove filter if there no listener left for the connection */
data = filter_data_find(connection, NULL, NULL, NULL, NULL, NULL,
NULL);
- if (!data)
+ if (data == NULL)
dbus_connection_remove_filter(connection, message_filter,
NULL);
struct filter_data *data;
struct filter_callback *cb;
- if (!name)
+ if (name == NULL)
return 0;
data = filter_data_get(connection, service_filter, NULL, NULL,
DBUS_INTERFACE_DBUS, "NameOwnerChanged",
name);
- if (!data)
+ if (data == NULL)
return 0;
cb = filter_data_add_callback(data, connect, disconnect, NULL, NULL,
user_data);
- if (!cb)
+ if (cb == NULL)
return 0;
if (connect)
data = filter_data_get(connection, signal_filter, sender, path,
interface, member, NULL);
- if (!data)
+ if (data == NULL)
return 0;
cb = filter_data_add_callback(data, NULL, NULL, function, destroy,
user_data);
- if (!cb)
+ if (cb == NULL)
return 0;
if (data->name != NULL && data->name_watch == 0)