summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--maps.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/maps.c b/maps.c
index 81f29c41..bb28ba65 100644
--- a/maps.c
+++ b/maps.c
@@ -165,11 +165,8 @@ char *map_num(mapping_t *map, int num)
int map_name(mapping_t *map, char *name)
{
- while (map->name) {
- if (strcmp(map->name, name)==0)
- return map->num;
+ while (map->name && strcmp(map->name, name) != 0)
map++;
- }
return map->num;
}