summaryrefslogtreecommitdiff
path: root/src/apoint.c
diff options
context:
space:
mode:
authorLukas Fleischer <calcurse@cryptocrack.de>2011-04-05 01:50:23 +0200
committerLukas Fleischer <calcurse@cryptocrack.de>2011-04-05 09:27:04 +0200
commit6fb0f6f4c6c5e17b9485fc666823feede35723b9 (patch)
tree2330c32238bf13fe89a3b25cf76f9abbbf433e51 /src/apoint.c
parentc4c7c8af5d4180905f1b1401a259ec8ce3c5ac75 (diff)
downloadcalcurse-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/apoint.c')
-rw-r--r--src/apoint.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/apoint.c b/src/apoint.c
index 4b562f7..f612071 100644
--- a/src/apoint.c
+++ b/src/apoint.c
@@ -141,7 +141,7 @@ apoint_new (char *mesg, char *note, long start, long dur, char state)
i = &alist_p->root;
for (;;)
{
- if (*i == 0 || (*i)->start > start)
+ if (*i == NULL || (*i)->start > start)
{
o->next = *i;
*i = o;
@@ -509,7 +509,7 @@ apoint_delete_bynum (long start, unsigned num, enum eraseflg flag)
n = 0;
pthread_mutex_lock (&(alist_p->mutex));
iptr = &alist_p->root;
- for (i = alist_p->root; i != 0; i = i->next)
+ for (i = alist_p->root; i != NULL; i = i->next)
{
if (apoint_inday (i, start))
{
@@ -616,7 +616,7 @@ apoint_check_next (struct notify_app *app, long start)
struct apoint *i;
pthread_mutex_lock (&(alist_p->mutex));
- for (i = alist_p->root; i != 0; i = i->next)
+ for (i = alist_p->root; i != NULL; i = i->next)
{
if (i->start > app->time)
{
@@ -684,7 +684,7 @@ apoint_switch_notify (void)
need_chk_notify = 0;
pthread_mutex_lock (&(alist_p->mutex));
- for (apoint = alist_p->root; apoint != 0; apoint = apoint->next)
+ for (apoint = alist_p->root; apoint != NULL; apoint = apoint->next)
{
if (apoint_inday (apoint, date))
{