1
0
mirror of git://projects.qi-hardware.com/eda-tools.git synced 2024-11-05 02:55:21 +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) {
assert(parent->sub->type == st_match);
if (!strcmp(name, parent->sub->u.match.src))
if (name == parent->sub->u.match.src)
return parent->sub;
parent = parent->parent;
}
@ -371,6 +371,7 @@ static void recurse_fin(struct subst *sub, const struct parent *parent)
case st_ignore:
break;
case st_break:
/* fall through */
case st_again:
sub->u.jump = resolve_jump(sub->u.tmp, parent);
break;