]> diplodocus.org Git - nmh/commitdiff
crawl_context: Remove unused struct member `total'.
authorRalph Corderoy <ralph@inputplus.co.uk>
Sat, 10 Dec 2016 23:55:50 +0000 (23:55 +0000)
committerRalph Corderoy <ralph@inputplus.co.uk>
Sat, 7 Jan 2017 13:33:03 +0000 (13:33 +0000)
It was maintained inconsistently, and checking what problems that caused
showed it wasn't used.

sbr/crawl_folders.c

index ec025be..ac264f1 100644 (file)
@@ -15,7 +15,6 @@ struct crawl_context {
     int max;                   /* how many folders we currently can hold in
                                 * the array `folders', increased by
                                 * CRAWL_NUMFOLDERS at a time */
-    int total;                 /* how many `folders' actually has */
     char **folders;            /* the array of folders */
     int start;
     int foldp;
@@ -47,7 +46,6 @@ add_folder (char *fold, struct crawl_context *crawl)
            return;
        }
 
-    crawl->total++;
     crawl->folders[crawl->foldp++] = fold;
 }
 
@@ -138,7 +136,7 @@ crawl_folders (char *dir, crawl_callback_t *callback, void *baton)
     struct crawl_context *crawl;
     NEW(crawl);
     crawl->max = CRAWL_NUMFOLDERS;
-    crawl->total = crawl->start = crawl->foldp = 0;
+    crawl->start = crawl->foldp = 0;
     crawl->folders = mh_xmalloc (crawl->max * sizeof(*crawl->folders));
 
     crawl_folders_body (crawl, dir, callback, baton);