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/gatresult.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/gatresult.c')
-rw-r--r-- | gatchat/gatresult.c | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/gatchat/gatresult.c b/gatchat/gatresult.c index cd7ec716..8a6dfae4 100644 --- a/gatchat/gatresult.c +++ b/gatchat/gatresult.c @@ -81,10 +81,10 @@ const char *g_at_result_iter_raw_line(GAtResultIter *iter) { const char *line; - if (!iter) + if (iter == NULL) return NULL; - if (!iter->l) + if (iter->l == NULL) return NULL; line = iter->l->data; @@ -113,10 +113,10 @@ gboolean g_at_result_iter_next_unquoted_string(GAtResultIter *iter, unsigned int len; char *line; - if (!iter) + if (iter == NULL) return FALSE; - if (!iter->l) + if (iter->l == NULL) return FALSE; line = iter->l->data; @@ -157,10 +157,10 @@ gboolean g_at_result_iter_next_string(GAtResultIter *iter, const char **str) unsigned int len; char *line; - if (!iter) + if (iter == NULL) return FALSE; - if (!iter->l) + if (iter->l == NULL) return FALSE; line = iter->l->data; @@ -209,10 +209,10 @@ gboolean g_at_result_iter_next_hexstring(GAtResultIter *iter, char *line; char *bufpos; - if (!iter) + if (iter == NULL) return FALSE; - if (!iter->l) + if (iter->l == NULL) return FALSE; line = iter->l->data; @@ -264,10 +264,10 @@ gboolean g_at_result_iter_next_number(GAtResultIter *iter, gint *number) int value = 0; char *line; - if (!iter) + if (iter == NULL) return FALSE; - if (!iter->l) + if (iter->l == NULL) return FALSE; line = iter->l->data; @@ -301,10 +301,10 @@ gboolean g_at_result_iter_next_range(GAtResultIter *iter, gint *min, gint *max) int high = 0; char *line; - if (!iter) + if (iter == NULL) return FALSE; - if (!iter->l) + if (iter->l == NULL) return FALSE; line = iter->l->data; @@ -391,10 +391,10 @@ gboolean g_at_result_iter_skip_next(GAtResultIter *iter) unsigned int skipped_to; char *line; - if (!iter) + if (iter == NULL) return FALSE; - if (!iter->l) + if (iter->l == NULL) return FALSE; line = iter->l->data; @@ -414,10 +414,10 @@ gboolean g_at_result_iter_open_list(GAtResultIter *iter) char *line; unsigned int len; - if (!iter) + if (iter == NULL) return FALSE; - if (!iter->l) + if (iter->l == NULL) return FALSE; line = iter->l->data; @@ -443,10 +443,10 @@ gboolean g_at_result_iter_close_list(GAtResultIter *iter) char *line; unsigned int len; - if (!iter) + if (iter == NULL) return FALSE; - if (!iter->l) + if (iter->l == NULL) return FALSE; line = iter->l->data; @@ -467,7 +467,7 @@ gboolean g_at_result_iter_close_list(GAtResultIter *iter) const char *g_at_result_final_response(GAtResult *result) { - if (!result) + if (result == NULL) return NULL; return result->final_or_pdu; @@ -475,7 +475,7 @@ const char *g_at_result_final_response(GAtResult *result) const char *g_at_result_pdu(GAtResult *result) { - if (!result) + if (result == NULL) return NULL; return result->final_or_pdu; @@ -483,10 +483,10 @@ const char *g_at_result_pdu(GAtResult *result) gint g_at_result_num_response_lines(GAtResult *result) { - if (!result) + if (result == NULL) return 0; - if (!result->lines) + if (result->lines == NULL) return 0; return g_slist_length(result->lines); |