summaryrefslogtreecommitdiff
path: root/src/dbus.c
diff options
context:
space:
mode:
authorLucas De Marchi <lucas.demarchi@profusion.mobi>2010-11-27 17:39:03 -0200
committerDenis Kenzior <denkenz@gmail.com>2010-11-29 13:27:15 -0600
commitb210838e87b737911a9bfbcf75ccd3d78736dad7 (patch)
tree91a91e0a120c70283b5ae3af0776cc19ab36fc76 /src/dbus.c
parent42bafa260a844c46d1de2f878464165bfad0ab75 (diff)
core: explicitly compare pointers to NULL
This patch was generated by the following semantic patch (http://coccinelle.lip6.fr/) // <smpl> @fix disable is_null,isnt_null1@ expression *E; @@ - !E + E == NULL // </smpl>
Diffstat (limited to 'src/dbus.c')
-rw-r--r--src/dbus.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/dbus.c b/src/dbus.c
index ad292412..c24615f4 100644
--- a/src/dbus.c
+++ b/src/dbus.c
@@ -175,8 +175,7 @@ int ofono_dbus_signal_property_changed(DBusConnection *conn,
DBusMessageIter iter;
signal = dbus_message_new_signal(path, interface, "PropertyChanged");
-
- if (!signal) {
+ if (signal == NULL) {
ofono_error("Unable to allocate new %s.PropertyChanged signal",
interface);
return -1;
@@ -202,8 +201,7 @@ int ofono_dbus_signal_array_property_changed(DBusConnection *conn,
DBusMessageIter iter;
signal = dbus_message_new_signal(path, interface, "PropertyChanged");
-
- if (!signal) {
+ if (signal == NULL) {
ofono_error("Unable to allocate new %s.PropertyChanged signal",
interface);
return -1;
@@ -229,8 +227,7 @@ int ofono_dbus_signal_dict_property_changed(DBusConnection *conn,
DBusMessageIter iter;
signal = dbus_message_new_signal(path, interface, "PropertyChanged");
-
- if (!signal) {
+ if (signal == NULL) {
ofono_error("Unable to allocate new %s.PropertyChanged signal",
interface);
return -1;
@@ -426,7 +423,7 @@ void __ofono_dbus_cleanup(void)
{
DBusConnection *conn = ofono_dbus_get_connection();
- if (!conn || !dbus_connection_get_is_connected(conn))
+ if (conn == NULL || !dbus_connection_get_is_connected(conn))
return;
dbus_gsm_set_connection(NULL);