fingerprint-strings: Make the finger_str_to_msg loop clearer

Just continue earlier instead of using a long if check
This commit is contained in:
Marco Trevisan (Treviño)
2020-12-07 18:24:57 +01:00
parent 52058c1ea0
commit 4a80bfacec

View File

@ -113,7 +113,8 @@ GNUC_UNUSED static char *finger_str_to_msg(const char *finger_name, const char *
return NULL;
for (i = 0; fingers[i].dbus_name != NULL; i++) {
if (str_equal (fingers[i].dbus_name, finger_name)) {
if (!str_equal (fingers[i].dbus_name, finger_name))
continue;
if (is_swipe == false) {
if (driver_name) {
char *s;
@ -134,7 +135,6 @@ GNUC_UNUSED static char *finger_str_to_msg(const char *finger_name, const char *
}
}
}
}
return NULL;
}