Remove some unneeded NULL checks

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

No files matched your search

+1 -1
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];