summaryrefslogtreecommitdiff
path: root/implicit.c
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2009-10-25 18:34:43 +0000
committerPaul Smith <psmith@gnu.org>2009-10-25 18:34:43 +0000
commit76d2d2ca41df98369945d0558e189f4023718256 (patch)
tree7bad04916ab780a43cdecdc0f47d8c47275d77b2 /implicit.c
parent4e51b6d9a4eb7eef2272551d55d8abaadd5f01e3 (diff)
downloadgunmake-76d2d2ca41df98369945d0558e189f4023718256.tar.gz
Fix fat-finger bug that left implicit rules with identical stem lengths
being sorted indeterminately.
Diffstat (limited to 'implicit.c')
-rw-r--r--implicit.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/implicit.c b/implicit.c
index b4e843c..0bf89e0 100644
--- a/implicit.c
+++ b/implicit.c
@@ -180,10 +180,10 @@ struct tryrule
int
stemlen_compare (const void *v1, const void *v2)
{
- const struct tryrule *r1 = (const struct tryrule *)v1;
- const struct tryrule *r2 = (const struct tryrule *)v2;
+ const struct tryrule *r1 = v1;
+ const struct tryrule *r2 = v2;
int r = r1->stemlen - r2->stemlen;
- return r != 0 ? r : (int)(r1->order - r1->order);
+ return r != 0 ? r : (int)(r1->order - r2->order);
}
/* Search the pattern rules for a rule with an existing dependency to make