From: Eric S. Raymond Date: Tue, 2 Sep 2003 03:08:36 +0000 (+0000) Subject: Define an exit status. X-Git-Tag: 1.0~80 X-Git-Url: http://thyrsus.com/gitweb/?a=commitdiff_plain;h=04a6487d920f31adb5a61b4042ed66947977c51d;p=comparator.git Define an exit status. --- diff --git a/report.c b/report.c index 1754eaa..b17b745 100644 --- a/report.c +++ b/report.c @@ -312,8 +312,8 @@ struct match_t *reduce_matches(int localdups) /* if all these matches are within the same tree, toss them */ heterogenous = 0; - for (mp = np; mp < np + nmatches; mp++) - if (sametree(mp[0].file,mp[1].file)) + for (i = 0; i < nmatches; i++) + if (sametree(mp[i].file,mp[(i+1) % nmatches].file)) heterogenous++; if (!heterogenous) continue; @@ -451,7 +451,7 @@ main(int argc, char *argv[]) #endif /* ODEBUG */ hitlist = reduce_matches(local_duplicates); - report_time("Reduction done."); + report_time("Reduction done"); for (; hitlist->next; hitlist = hitlist->next) if (hitlist->matches) @@ -466,4 +466,6 @@ main(int argc, char *argv[]) } printf("-\n"); } + + exit(0); }