Remove some unneeded NULL checks

Found by Coverity; also see commit 85fb2af3.
This commit is contained in:
wm4
2014-11-21 09:58:09 +01:00
parent 38f4ec69d1
commit e082c2c3df
4 changed files with 22 additions and 25 deletions

View File

@@ -305,7 +305,7 @@ int mp_input_get_keys_from_string(char *name, int max_num_keys,
ptr = name;
n = 0;
for (end = strchr(ptr, '-'); ptr != NULL; end = strchr(ptr, '-')) {
for (end = strchr(ptr, '-'); ; end = strchr(ptr, '-')) {
if (end && end[1] != '\0') {
if (end[1] == '-')
end = &end[1];