mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-19 20:20:18 +00:00
Don't return 0 in place of NULL
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user