From 9a434df1493afc3d97c12ea9a98f596d790ea239 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Wed, 17 Sep 2003 04:01:43 +0000 Subject: [PATCH] Adjust the array length propery. --- report.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/report.c b/report.c index ab14e21..867195a 100644 --- 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++) -- 2.43.0