]> thyrsus.com Git - comparator.git/commitdiff
Define an exit status.
authorEric S. Raymond <esr@thyrsus.com>
Tue, 2 Sep 2003 03:08:36 +0000 (03:08 +0000)
committerEric S. Raymond <esr@thyrsus.com>
Tue, 2 Sep 2003 03:08:36 +0000 (03:08 +0000)
report.c

index 1754eaaa8391daeb3b46cdebd0144ecf6a400fad..b17b74599772b3d9d1460c8e0e1853ecacdccbbe 100644 (file)
--- 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);
 }