about summary refs log tree commit diff
path: root/analyzer
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2019-01-04 01:17:13 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2019-01-04 01:17:13 +0000
commitca5e0110d3a45da5996720ce6983b440e2f791f3 (patch)
tree5ba6f0f2883551af7ecfb29f2792abf9efc8e99d /analyzer
parenta67834f46d0cbbece9f6c9b7d7add97a250cafe5 (diff)
downloadnetpbm-mirror-ca5e0110d3a45da5996720ce6983b440e2f791f3.tar.gz
netpbm-mirror-ca5e0110d3a45da5996720ce6983b440e2f791f3.tar.xz
netpbm-mirror-ca5e0110d3a45da5996720ce6983b440e2f791f3.zip
cleanup
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@3483 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'analyzer')
-rw-r--r--analyzer/pamfile.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/analyzer/pamfile.c b/analyzer/pamfile.c
index 3166e467..7b61f6fd 100644
--- a/analyzer/pamfile.c
+++ b/analyzer/pamfile.c
@@ -229,7 +229,7 @@ readToNextImage(const struct pam * const pamP,
 
 static void
 doOneImage(const char *      const name,
-           unsigned int      const imageDoneCount,
+           unsigned int      const imageDoneCt,
            FILE *            const fileP,
            enum ReportFormat const reportFormat,
            bool              const allimages,
@@ -256,7 +256,7 @@ doOneImage(const char *      const name,
         break;
     case RF_HUMAN:
         if (allimages)
-            printf("%s:\tImage %d:\t", name, imageDoneCount);
+            printf("%s:\tImage %d:\t", name, imageDoneCt);
         else
             printf("%s:\t", name);
 
@@ -294,21 +294,20 @@ describeOneFile(const char *      const name,
    'wantComments' means to show the comments from the image header.
    Meaningful only when 'reportFormat' is RF_HUMAN.
 -----------------------------------------------------------------------------*/
-    unsigned int imageDoneCount;
+    unsigned int imageDoneCt;
         /* Number of images we've processed so far */
     bool eof;
 
-    eof = false;
-    imageDoneCount = 0;
-
-    while (!eof && (imageDoneCount < 1 || allimages)) {
-        doOneImage(name, imageDoneCount, fileP,
+    for (eof = false, imageDoneCt = 0;
+         !eof && (imageDoneCt < 1 || allimages);
+        ++imageDoneCt
+        ) {
+        doOneImage(name, imageDoneCt, fileP,
                    reportFormat, allimages, wantComments,
                    &eof);
-        ++imageDoneCount;
     }
     if (reportFormat == RF_COUNT)
-        printf("%s:\t%u images\n", name, imageDoneCount);
+        printf("%s:\t%u images\n", name, imageDoneCt);
 }