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
commitf04688aca45561bc8165c2bd4bd893fd8dedeba8 (patch)
tree7bad04916ab780a43cdecdc0f47d8c47275d77b2 /implicit.c
parentf2d1001d3264b0a9fda72f997de7f98f9cdcfe40 (diff)
downloadmake-f04688aca45561bc8165c2bd4bd893fd8dedeba8.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 b4e843cb..0bf89e0b 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