mirror of
https://github.com/jarun/nnn.git
synced 2025-01-15 21:36:42 +00:00
avoid doing arithmetic on void pointer
This commit is contained in:
parent
e44f8d3fcc
commit
78c0d54400
|
@ -7971,9 +7971,9 @@ static char *load_input(int fd, const char *path)
|
|||
++chunk_count;
|
||||
|
||||
while (off < total_read) {
|
||||
next = memchr(input + off, '\0', total_read - off) + 1;
|
||||
if (next == (void *)1)
|
||||
if ((next = memchr(input + off, '\0', total_read - off)) == NULL)
|
||||
break;
|
||||
++next;
|
||||
|
||||
if (next - input == off + 1) {
|
||||
off = next - input;
|
||||
|
|
Loading…
Reference in a new issue