diff options
author | Lucas De Marchi <lucas.demarchi@profusion.mobi> | 2010-11-27 17:39:00 -0200 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2010-11-29 12:05:29 -0600 |
commit | 521071a7853b225713606de3e0421e680f187709 (patch) | |
tree | 57927fea85638f448436ea02706b99429ff13fc5 /gatchat/gathdlc.c | |
parent | 00cdf2b427a788492baeb0e29b9063a36ef1effe (diff) | |
download | ofono-521071a7853b225713606de3e0421e680f187709.tar.bz2 |
gatchat: 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 'gatchat/gathdlc.c')
-rw-r--r-- | gatchat/gathdlc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gatchat/gathdlc.c b/gatchat/gathdlc.c index 37f014aa..dd11043c 100644 --- a/gatchat/gathdlc.c +++ b/gatchat/gathdlc.c @@ -256,7 +256,7 @@ GAtHDLC *g_at_hdlc_new(GIOChannel *channel) GAtHDLC *g_at_hdlc_ref(GAtHDLC *hdlc) { - if (!hdlc) + if (hdlc == NULL) return NULL; g_atomic_int_inc(&hdlc->ref_count); @@ -266,7 +266,7 @@ GAtHDLC *g_at_hdlc_ref(GAtHDLC *hdlc) void g_at_hdlc_unref(GAtHDLC *hdlc) { - if (!hdlc) + if (hdlc == NULL) return; if (g_atomic_int_dec_and_test(&hdlc->ref_count) == FALSE) @@ -291,7 +291,7 @@ void g_at_hdlc_unref(GAtHDLC *hdlc) void g_at_hdlc_set_debug(GAtHDLC *hdlc, GAtDebugFunc func, gpointer user_data) { - if (!hdlc) + if (hdlc == NULL) return; hdlc->debugf = func; @@ -301,7 +301,7 @@ void g_at_hdlc_set_debug(GAtHDLC *hdlc, GAtDebugFunc func, gpointer user_data) void g_at_hdlc_set_receive(GAtHDLC *hdlc, GAtReceiveFunc func, gpointer user_data) { - if (!hdlc) + if (hdlc == NULL) return; hdlc->receive_func = func; |