From b279dfcb64043c5072515a3c8984334916fcab6a Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 1 Jan 2018 16:45:18 +0100 Subject: [PATCH] Simplify extract_value --- libretro-common/file/config_file.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/libretro-common/file/config_file.c b/libretro-common/file/config_file.c index 92403b1a20..378f8e67a2 100644 --- a/libretro-common/file/config_file.c +++ b/libretro-common/file/config_file.c @@ -141,16 +141,13 @@ static char *extract_value(char *line, bool is_value) if (*line == '"') { line++; - if (*line == '"') return strdup(""); + if (*line == '"') + return strdup(""); tok = strtok_r(line, "\"", &save); } - else if (*line == '\0') /* Nothing */ - return NULL; - else - { - /* We don't have that. Read until next space. */ + /* We don't have that. Read until next space. */ + else if (*line != '\0') /* Nothing */ tok = strtok_r(line, " \n\t\f\r\v", &save); - } if (tok) return strdup(tok);