From 87f6f2a16d642df8f846f432151cb803b766b3cb Mon Sep 17 00:00:00 2001 From: Thomas White Date: Fri, 20 Jul 2012 15:01:48 -0400 Subject: Tidy up the exit path from run_work() --- src/im-sandbox.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/im-sandbox.c b/src/im-sandbox.c index 8187612d..eb823683 100644 --- a/src/im-sandbox.c +++ b/src/im-sandbox.c @@ -345,15 +345,12 @@ static void run_work(const struct index_args *iargs, line = malloc(1024*sizeof(char)); rval = fgets(line, 1023, fh); if ( rval == NULL ) { + + ERROR("Read error!\n"); free(line); - if ( feof(fh) ) { - allDone = 1; - STATUS("Exiting!\n"); - continue; - } else { - ERROR("Read error!\n"); - break; - } + allDone = 1; + continue; + } chomp(line); -- cgit v1.2.3