Found by Coverity; also see commit 85fb2af3.
Showing the changes to input/keycodes.c (1 of 4 files). Show all
Unified · Split
| @@ -305,7 +305,7 @@ int mp_input_get_keys_from_string(char *name, int max_num_keys, · 304 unmodified lines | ||
| 305 | 305 | |
| 306 | 306 | ptr = name; |
| 307 | 307 | n = 0; |
| 308 | − for (end = strchr(ptr, '-'); ptr != NULL; end = strchr(ptr, '-')) { | |
| 308 | + for (end = strchr(ptr, '-'); ; end = strchr(ptr, '-')) { | |
| 309 | 309 | if (end && end[1] != '\0') { |
| 310 | 310 | if (end[1] == '-') |
| 311 | 311 | end = &end[1]; |