Don't return 0 in place of NULL

This commit is contained in:
TingPing
2014-12-31 11:31:17 -05:00
parent 112632bb4e
commit 2a28289314
9 changed files with 25 additions and 25 deletions

View File

@@ -52,7 +52,7 @@ history_down (struct history *his)
int next;
if (his->pos == his->realpos) /* allow down only after up */
return 0;
return NULL;
if (his->realpos == 0)
{
if (his->pos == HISTORY_SIZE - 1)
@@ -79,7 +79,7 @@ history_down (struct history *his)
return his->lines[his->pos];
}
return 0;
return NULL;
}
char *
@@ -90,11 +90,11 @@ history_up (struct history *his, char *current_text)
if (his->realpos == HISTORY_SIZE - 1)
{
if (his->pos == 0)
return 0;
return NULL;
} else
{
if (his->pos == his->realpos + 1)
return 0;
return NULL;
}
next = HISTORY_SIZE - 1;
@@ -117,5 +117,5 @@ history_up (struct history *his, char *current_text)
return his->lines[his->pos];
}
return 0;
return NULL;
}