aboutsummaryrefslogtreecommitdiffstats
path: root/libgamepad_get_relative_axis_by_name.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--libgamepad_get_relative_axis_by_name.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/libgamepad_get_relative_axis_by_name.c b/libgamepad_get_relative_axis_by_name.c
index 34b9827..f82ba0a 100644
--- a/libgamepad_get_relative_axis_by_name.c
+++ b/libgamepad_get_relative_axis_by_name.c
@@ -21,16 +21,14 @@ libgamepad_get_relative_axis_by_name(const char *name)
}
errno = saved_errno;
return (int16_t)code;
- } else {
- if (!strncasecmp(name, "REL_#", 5)) {
- if (isdigit(name[5])) {
- name = &name[5];
- goto numerical;
- }
+ } else if (!strncasecmp(name, "REL_#", 5)) {
+ if (isdigit(name[5])) {
+ name = &name[5];
+ goto numerical;
}
for (code = 0; code < ELEMSOF(libgamepad_relative_axis_names__); code++)
if (!strcasecmp(name, libgamepad_relative_axis_names__[code]))
return (int16_t)code;
- return -1;
}
+ return -1;
}