lib/io.c: small cleanup
This commit is contained in:
parent
5e39e3554e
commit
a8e48c2058
1 changed files with 2 additions and 3 deletions
5
lib/io.c
5
lib/io.c
|
|
@ -13,11 +13,10 @@ int readnum(FILE *fd, char *buf, size_t len) {
|
||||||
if (c < '0' || c > '9')
|
if (c < '0' || c > '9')
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
buf[i] = c;
|
buf[i++] = c;
|
||||||
|
|
||||||
if (i+1 > len)
|
if (i > len)
|
||||||
break;
|
break;
|
||||||
i++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return i;
|
return i;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue