Fix typo breaking functionality in tail
This commit is contained in:
parent
b712ef44ad
commit
7a6af2faba
2
tail.c
2
tail.c
@ -60,7 +60,7 @@ dropinit(FILE *fp, const char *str, long n)
|
|||||||
ssize_t len;
|
ssize_t len;
|
||||||
unsigned long i = 0;
|
unsigned long i = 0;
|
||||||
|
|
||||||
while(i < n && ((len = agetline(&buf, &size, fp) != -1)))
|
while(i < n && ((len = agetline(&buf, &size, fp)) != -1))
|
||||||
if(len && buf[len - 1] == '\n')
|
if(len && buf[len - 1] == '\n')
|
||||||
i++;
|
i++;
|
||||||
free(buf);
|
free(buf);
|
||||||
|
Loading…
Reference in New Issue
Block a user