Fixed compiler warning on newer Linux systems.
(transplanted from 3ab4702d6313b2590f202f1475cd68976765f02f)
This commit is contained in:
parent
0310835418
commit
7aaa4dc6bf
|
@ -1116,7 +1116,9 @@ static void open_history_file(void)
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
fgets(buf, sizeof (buf), f);
|
if (fgets(buf, sizeof (buf), f) == NULL)
|
||||||
|
break;
|
||||||
|
|
||||||
if (buf[strlen(buf) - 1] == '\n')
|
if (buf[strlen(buf) - 1] == '\n')
|
||||||
buf[strlen(buf) - 1] = '\0';
|
buf[strlen(buf) - 1] = '\0';
|
||||||
add_history(buf);
|
add_history(buf);
|
||||||
|
|
Loading…
Reference in New Issue