diff options
author | Lukas Fleischer <calcurse@cryptocrack.de> | 2011-04-05 01:50:23 +0200 |
---|---|---|
committer | Lukas Fleischer <calcurse@cryptocrack.de> | 2011-04-05 09:27:04 +0200 |
commit | 6fb0f6f4c6c5e17b9485fc666823feede35723b9 (patch) | |
tree | 2330c32238bf13fe89a3b25cf76f9abbbf433e51 /src/todo.c | |
parent | c4c7c8af5d4180905f1b1401a259ec8ce3c5ac75 (diff) | |
download | calcurse-6fb0f6f4c6c5e17b9485fc666823feede35723b9.zip |
Compare pointers to "NULL" instead of "0".
"bad_zero.cocci" spatch from http://coccinelle.lip6.fr/impact_linux.php.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
Diffstat (limited to 'src/todo.c')
-rw-r--r-- | src/todo.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -182,7 +182,7 @@ todo_add (char *mesg, int id, char *note) absid = abs (id); for (;;) { - if (*i == 0 || abs ((*i)->id) > absid) + if (*i == NULL || abs ((*i)->id) > absid) { o->next = *i; *i = o; @@ -201,7 +201,7 @@ todo_delete_note_bynum (unsigned num) struct todo *i; n = 0; - for (i = todolist; i != 0; i = i->next) + for (i = todolist; i != NULL; i = i->next) { if (n == num) { @@ -225,7 +225,7 @@ todo_delete_bynum (unsigned num, enum eraseflg flag) n = 0; iptr = &todolist; - for (i = todolist; i != 0; i = i->next) + for (i = todolist; i != NULL; i = i->next) { if (n == num) { @@ -451,7 +451,7 @@ todo_update_panel (int which_pan) /* Print todo item in the panel. */ erase_window_part (win[TOD].p, 1, title_lines, win[TOD].w - 2, win[TOD].h - 2); - for (i = todolist; i != 0; i = i->next) + for (i = todolist; i != NULL; i = i->next) { num_todo++; t_realpos = num_todo - first; |