From 8e779bfb87142f69247b7c0e46b17eabbc1006e8 Mon Sep 17 00:00:00 2001 From: Yamagi Burmeister Date: Thu, 30 May 2019 11:11:29 +0200 Subject: [PATCH] Remove superfluous statements. `while (*s != '\\' && *s)` already checks for `s` being valid. This was reported by @m-x-d, closes #401. --- src/common/shared/shared.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/common/shared/shared.c b/src/common/shared/shared.c index 7de02faa..bcb69f4e 100644 --- a/src/common/shared/shared.c +++ b/src/common/shared/shared.c @@ -1242,11 +1242,6 @@ Info_ValueForKey(char *s, char *key) while (*s != '\\' && *s) { - if (!*s) - { - return ""; - } - *o++ = *s++; } @@ -1307,11 +1302,6 @@ Info_RemoveKey(char *s, char *key) while (*s != '\\' && *s) { - if (!*s) - { - return; - } - *o++ = *s++; }