1
0
mirror of git://projects.qi-hardware.com/eda-tools.git synced 2024-11-17 19:56:14 +02:00

b2/subst.c (resolve_jump): use pointer comparison instead of strcmp

Both come from "unique".
This commit is contained in:
Werner Almesberger 2012-05-22 14:27:39 -03:00
parent 21702781bc
commit 2ce2da5c30

View File

@ -286,7 +286,7 @@ static const struct subst *resolve_jump(const char *name,
{ {
while (parent) { while (parent) {
assert(parent->sub->type == st_match); assert(parent->sub->type == st_match);
if (!strcmp(name, parent->sub->u.match.src)) if (name == parent->sub->u.match.src)
return parent->sub; return parent->sub;
parent = parent->parent; parent = parent->parent;
} }
@ -371,6 +371,7 @@ static void recurse_fin(struct subst *sub, const struct parent *parent)
case st_ignore: case st_ignore:
break; break;
case st_break: case st_break:
/* fall through */
case st_again: case st_again:
sub->u.jump = resolve_jump(sub->u.tmp, parent); sub->u.jump = resolve_jump(sub->u.tmp, parent);
break; break;