summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src
diff options
context:
space:
mode:
authorBharat Shetty Barkur <bharat.shetty@gmail.com>2009-04-02 01:41:55 -0400
committerAnand V. Avati <avati@amp.gluster.com>2009-04-02 18:13:30 +0530
commit1e9b5a5a35e8d53e631788443dadf1fe30853743 (patch)
treee893443e8463092bc2cd447a61ee7908d5abf847 /libglusterfs/src
parentaa0fd06dad70a7ecfc3dab819e9b3fab8baad2a9 (diff)
Changed few lines to ensure Optimization (lesser code).
Changed few lines to ensure lesser code optimization while checking the EOF for the file pointed to by specfp. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
Diffstat (limited to 'libglusterfs/src')
-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);
}