From b210838e87b737911a9bfbcf75ccd3d78736dad7 Mon Sep 17 00:00:00 2001 From: Lucas De Marchi Date: Sat, 27 Nov 2010 17:39:03 -0200 Subject: core: explicitly compare pointers to NULL This patch was generated by the following semantic patch (http://coccinelle.lip6.fr/) // @fix disable is_null,isnt_null1@ expression *E; @@ - !E + E == NULL // --- src/call-volume.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/call-volume.c') diff --git a/src/call-volume.c b/src/call-volume.c index 6f692f32..1e12d810 100644 --- a/src/call-volume.c +++ b/src/call-volume.c @@ -236,7 +236,7 @@ static DBusMessage *cv_set_property(DBusConnection *conn, DBusMessage *msg, if (g_str_equal(property, "SpeakerVolume") == TRUE) { unsigned char percent; - if (!cv->driver->speaker_volume) + if (cv->driver->speaker_volume == NULL) return __ofono_error_not_implemented(msg); if (dbus_message_iter_get_arg_type(&var) != DBUS_TYPE_BYTE) @@ -258,7 +258,7 @@ static DBusMessage *cv_set_property(DBusConnection *conn, DBusMessage *msg, } else if (g_str_equal(property, "MicrophoneVolume") == TRUE) { unsigned char percent; - if (!cv->driver->microphone_volume) + if (cv->driver->microphone_volume == NULL) return __ofono_error_not_implemented(msg); if (dbus_message_iter_get_arg_type(&var) != DBUS_TYPE_BYTE) @@ -280,7 +280,7 @@ static DBusMessage *cv_set_property(DBusConnection *conn, DBusMessage *msg, } else if (g_str_equal(property, "Muted") == TRUE) { dbus_bool_t muted; - if (!cv->driver->mute) + if (cv->driver->mute == NULL) return __ofono_error_not_implemented(msg); if (dbus_message_iter_get_arg_type(&var) != DBUS_TYPE_BOOLEAN) -- cgit v1.2.3