mount: style for loop in catfile()

Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
This commit is contained in:
Hiltjo Posthuma 2014-04-05 11:56:40 +02:00 committed by sin
parent ef1ab48699
commit acdac11285
1 changed files with 1 additions and 3 deletions

View File

@ -107,9 +107,7 @@ catfile(FILE *in, FILE *out)
char buf[BUFSIZ];
size_t bytesread;
while(1) {
if(feof(in))
break;
while(!feof(in)) {
bytesread = fread(buf, 1, sizeof(buf), in);
if(ferror(in))
return 0;