From 521071a7853b225713606de3e0421e680f187709 Mon Sep 17 00:00:00 2001 From: Lucas De Marchi Date: Sat, 27 Nov 2010 17:39:00 -0200 Subject: gatchat: 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 // --- gatchat/gatmux.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gatchat/gatmux.c') diff --git a/gatchat/gatmux.c b/gatchat/gatmux.c index fb912e63..9aed9879 100644 --- a/gatchat/gatmux.c +++ b/gatchat/gatmux.c @@ -414,7 +414,7 @@ static gboolean watch_dispatch(GSource *source, GSourceFunc callback, GAtMuxWatch *watch = (GAtMuxWatch *) source; GAtMuxChannel *channel = (GAtMuxChannel *) watch->channel; - if (!func) + if (func == NULL) return FALSE; return func(watch->channel, channel->condition & watch->condition, @@ -554,11 +554,11 @@ GAtMux *g_at_mux_new(GIOChannel *channel, const GAtMuxDriver *driver) { GAtMux *mux; - if (!channel) + if (channel == NULL) return NULL; mux = g_try_new0(GAtMux, 1); - if (!mux) + if (mux == NULL) return NULL; mux->ref_count = 1; -- cgit v1.2.3