From 1e9b5a5a35e8d53e631788443dadf1fe30853743 Mon Sep 17 00:00:00 2001 From: Bharat Shetty Barkur Date: Thu, 2 Apr 2009 01:41:55 -0400 Subject: 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 --- libglusterfs/src/common-utils.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'libglusterfs/src') 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); } -- cgit