diff options
author | Thomas White <taw@physics.org> | 2012-05-29 18:23:10 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2012-05-29 18:23:10 +0200 |
commit | c2d6b10c8d1a1fffe556c58d9bb12738f847d208 (patch) | |
tree | d321effe7eff4b8f4b56b7e56627a983543f7670 /src/indexamajig.c | |
parent | d9a6df9abf1cf38a3ae821911330f36f336ea4de (diff) |
Handle the end of the file list cleanly
Diffstat (limited to 'src/indexamajig.c')
-rw-r--r-- | src/indexamajig.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/indexamajig.c b/src/indexamajig.c index aab6a0eb..3c7b0cb9 100644 --- a/src/indexamajig.c +++ b/src/indexamajig.c @@ -473,8 +473,13 @@ static void run_work(const struct index_args *iargs, rval = fgets(line, 1023, fh); if ( rval == NULL ) { free(line); - ERROR("Read error!\n"); - return; + if ( feof(fh) ) { + allDone = 1; + continue; + } else { + ERROR("Read error!\n"); + return; + } } chomp(line); |