]> thyrsus.com Git - comparator.git/commitdiff
Correct a regression bug.
authorEric S. Raymond <esr@thyrsus.com>
Thu, 18 Sep 2003 23:04:56 +0000 (23:04 +0000)
committerEric S. Raymond <esr@thyrsus.com>
Thu, 18 Sep 2003 23:04:56 +0000 (23:04 +0000)
main.c
shred.h
shredtree.c

diff --git a/main.c b/main.c
index 080931c0f06bdda77688ad0b33b0d9e9993cdab8..29b2727159fd6435f1703c6269375a007f59dc92 100644 (file)
--- a/main.c
+++ b/main.c
@@ -88,7 +88,7 @@ void corehook(struct hash_t hash, struct filehdr_t *file)
     sort_count++;
 }
 
-void extend_current_chunk(void)
+void extend_current_chunk(limit)
 /* bump the end-line number on the last chunk, if there is one */
 {
     if (sort_count > 0)
diff --git a/shred.h b/shred.h
index a825bfa0621b6a9506125309e525e417afb09261..11087305a8d1f094814b65746dbb4d113fa2ffbd 100644 (file)
--- a/shred.h
+++ b/shred.h
@@ -63,7 +63,7 @@ extern int shredsize, minsize;
 extern void report_time(char *legend, ...);
 struct filehdr_t *register_file(const char *file, linenum_t length);
 extern void corehook(struct hash_t hash, struct filehdr_t *file);
-extern void extend_current_chunk(void);
+extern void extend_current_chunk(int);
 extern void dump_array(const char *legend,
                       struct sorthash_t *obarray, int hashcount);
 extern void dump_flags(const int flags, FILE *fp);
index dd0bb3fdc71c747d68181e333fdbc17f38a47cea..4c91cfd5e4bb1afb3b731307f57b3159aaaeefde 100644 (file)
@@ -223,8 +223,8 @@ int shredfile(struct filehdr_t *file,
             * styles).  This is a kluge, but it means we will capture
             * entire C functions that differ only by brace placement.
             */
-           if (remove_braces && braceline && linecount < file->length)
-               extend_current_chunk();
+           if (remove_braces && braceline)
+               extend_current_chunk(file->length);
            continue;
        }
        accepted++;