summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libglusterfs/src/common-utils.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/libglusterfs/src/common-utils.c b/libglusterfs/src/common-utils.c
index 372195daa..301a82879 100644
--- a/libglusterfs/src/common-utils.c
+++ b/libglusterfs/src/common-utils.c
@@ -252,9 +252,7 @@ gf_log_volume_file (FILE *specfp)
fprintf (gf_log_logfile,
"+---------------------------------------"
"---------------------------------------+\n");
- while (!feof (specfp)) {
- if (fgets (data, GF_UNIT_KB, specfp) == NULL)
- break;
+ while (fgets (data, GF_UNIT_KB, specfp) != NULL){
lcount++;
fprintf (gf_log_logfile, "%3d: %s", lcount, data);
}