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_auth.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_auth.c')
-rw-r--r-- | gatchat/ppp_auth.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gatchat/ppp_auth.c b/gatchat/ppp_auth.c index d26b764e..fca873ca 100644 --- a/gatchat/ppp_auth.c +++ b/gatchat/ppp_auth.c @@ -66,7 +66,7 @@ static void chap_process_challenge(struct ppp_chap *chap, const guint8 *packet) /* create a checksum over id, secret, and challenge */ checksum = g_checksum_new(chap->method); - if (!checksum) + if (checksum == NULL) return; g_checksum_update(checksum, &header->identifier, 1); @@ -84,7 +84,7 @@ static void chap_process_challenge(struct ppp_chap *chap, const guint8 *packet) digest_len = g_checksum_type_get_length(chap->method); response_length = digest_len + sizeof(*header) + 1; ppp_packet = ppp_packet_new(response_length, CHAP_PROTOCOL); - if (!ppp_packet) + if (ppp_packet == NULL) goto challenge_out; response = (struct chap_header *) &ppp_packet->info; @@ -144,7 +144,7 @@ struct ppp_chap *ppp_chap_new(GAtPPP *ppp, guint8 method) return NULL; chap = g_try_new0(struct ppp_chap, 1); - if (!chap) + if (chap == NULL) return NULL; chap->ppp = ppp; |