mirror of git://git.suckless.org/ubase
mount: style for loop in catfile()
Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
This commit is contained in:
parent
ef1ab48699
commit
acdac11285
4
mount.c
4
mount.c
|
@ -107,9 +107,7 @@ catfile(FILE *in, FILE *out)
|
||||||
char buf[BUFSIZ];
|
char buf[BUFSIZ];
|
||||||
size_t bytesread;
|
size_t bytesread;
|
||||||
|
|
||||||
while(1) {
|
while(!feof(in)) {
|
||||||
if(feof(in))
|
|
||||||
break;
|
|
||||||
bytesread = fread(buf, 1, sizeof(buf), in);
|
bytesread = fread(buf, 1, sizeof(buf), in);
|
||||||
if(ferror(in))
|
if(ferror(in))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue