ubase

suckless linux base utils
git clone git://git.2f30.org/ubase
Log | Files | Refs | README | LICENSE

commit acdac112852f822fed95fd6da7f0d3b80fa81af0
parent ef1ab486994e92164b351245530e842ed93e3097
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Sat,  5 Apr 2014 11:56:40 +0200

mount: style for loop in catfile()

Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>

Diffstat:
Mmount.c | 4+---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/mount.c b/mount.c @@ -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;