]> thyrsus.com Git - comparator.git/commitdiff
Adjust the array length propery.
authorEric S. Raymond <esr@thyrsus.com>
Wed, 17 Sep 2003 04:01:43 +0000 (04:01 +0000)
committerEric S. Raymond <esr@thyrsus.com>
Wed, 17 Sep 2003 04:01:43 +0000 (04:01 +0000)
report.c

index ab14e21550fbd8827cd42c57958be2fe13bfcf08..867195a8b40685a90b6d2744b008ff98753ac3bf 100644 (file)
--- a/report.c
+++ b/report.c
@@ -357,8 +357,9 @@ void emit_report(struct sorthash_t *obarray, int hashcount)
      * Compact the match list in order to cut the n log n qsort time
      */
     for (copy = match = hitlist; match < hitlist + hashcount; match++)
-       if (match->nmatches && copy < match)
+       if (match->nmatches > 0 && copy < match)
            *copy++ = *match;
+    mergecount = (copy - hitlist);
     qsort(hitlist, mergecount, sizeof(struct match_t), sortmatch);
 
     for (match = hitlist; match < hitlist + mergecount; match++)