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/ppp_lcp.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/ppp_lcp.c')
-rw-r--r-- | gatchat/ppp_lcp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gatchat/ppp_lcp.c b/gatchat/ppp_lcp.c index 5838ebda..3a80a624 100644 --- a/gatchat/ppp_lcp.c +++ b/gatchat/ppp_lcp.c @@ -225,7 +225,7 @@ static enum rcr_result lcp_rcr(struct pppcp_data *pppcp, */ option = g_try_malloc0(5); - if (!option) + if (option == NULL) return RCR_REJECT; option[0] = AUTH_PROTO; @@ -310,11 +310,11 @@ struct pppcp_data *lcp_new(GAtPPP *ppp, gboolean is_server) struct lcp_data *lcp; lcp = g_try_new0(struct lcp_data, 1); - if (!lcp) + if (lcp == NULL) return NULL; pppcp = pppcp_new(ppp, &lcp_proto, is_server, 0); - if (!pppcp) { + if (pppcp == NULL) { g_free(lcp); return NULL; } |