summaryrefslogtreecommitdiffhomepage
path: root/ir/common
diff options
context:
space:
mode:
authorChristoph Mallon <christoph.mallon@gmx.de>2015-12-06 22:38:19 +0100
committerChristoph Mallon <christoph.mallon@gmx.de>2015-12-07 18:41:49 +0100
commit4075c5421f35fe15adb08b9e3ae189a13ab7e408 (patch)
tree3d98c31fb57018200b462ad593d50a369f975f66 /ir/common
parent31f3d128912d1097c070fee3bc46a122da28c181 (diff)
adt: Add and use 'streq()'.
Diffstat (limited to 'ir/common')
-rw-r--r--ir/common/debugger.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/ir/common/debugger.c b/ir/common/debugger.c
index dae2e7a..e9aaf6f 100644
--- a/ir/common/debugger.c
+++ b/ir/common/debugger.c
@@ -588,7 +588,7 @@ static ir_type *find_type_name(const char *name)
if (!is_compound_type(tp))
continue;
- if (strcmp(get_compound_name(tp), name) == 0)
+ if (streq(get_compound_name(tp), name))
return tp;
}
return NULL;
@@ -624,9 +624,8 @@ static void check_ent_name(ir_type *const type, ir_entity *const entity, void *c
(void)type;
find_env_t *env = (find_env_t*)ctx;
- if (entity && strcmp(get_entity_name(entity), env->u.name) == 0) {
+ if (entity && streq(get_entity_name(entity), env->u.name))
env->res = entity;
- }
}
/**
@@ -1091,7 +1090,7 @@ void firm_debug(const char *cmd)
if (token == tok_number) {
dbg_printf("Setting initial node number to %u\n", lexer.number);
irp->max_node_nr = lexer.number;
- } else if (token == tok_identifier && !strcmp(lexer.s, "rand")) {
+ } else if (token == tok_identifier && streq(lexer.s, "rand")) {
dbg_printf("Randomizing initial node number\n");
srand(time(0));
irp->max_node_nr += rand() % 6666;