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/gatppp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gatchat/gatppp.c') diff --git a/gatchat/gatppp.c b/gatchat/gatppp.c index 5e875b8a..bbd8ab1a 100644 --- a/gatchat/gatppp.c +++ b/gatchat/gatppp.c @@ -78,7 +78,7 @@ struct _GAtPPP { void ppp_debug(GAtPPP *ppp, const char *str) { - if (!ppp || !ppp->debugf) + if (ppp == NULL || ppp->debugf == NULL) return; ppp->debugf(str, ppp->debug_data); @@ -490,7 +490,7 @@ static GAtPPP *ppp_init_common(GAtHDLC *hdlc, gboolean is_server, guint32 ip) GAtPPP *ppp; ppp = g_try_malloc0(sizeof(GAtPPP)); - if (!ppp) + if (ppp == NULL) return NULL; ppp->hdlc = g_at_hdlc_ref(hdlc); -- cgit v1.2.3