mirror of
https://github.com/libretro/RetroArch
synced 2025-04-09 21:45:45 +00:00
Simplify extract_value
This commit is contained in:
parent
515918f80c
commit
b279dfcb64
@ -141,16 +141,13 @@ static char *extract_value(char *line, bool is_value)
|
|||||||
if (*line == '"')
|
if (*line == '"')
|
||||||
{
|
{
|
||||||
line++;
|
line++;
|
||||||
if (*line == '"') return strdup("");
|
if (*line == '"')
|
||||||
|
return strdup("");
|
||||||
tok = strtok_r(line, "\"", &save);
|
tok = strtok_r(line, "\"", &save);
|
||||||
}
|
}
|
||||||
else if (*line == '\0') /* Nothing */
|
/* We don't have that. Read until next space. */
|
||||||
return NULL;
|
else if (*line != '\0') /* Nothing */
|
||||||
else
|
|
||||||
{
|
|
||||||
/* We don't have that. Read until next space. */
|
|
||||||
tok = strtok_r(line, " \n\t\f\r\v", &save);
|
tok = strtok_r(line, " \n\t\f\r\v", &save);
|
||||||
}
|
|
||||||
|
|
||||||
if (tok)
|
if (tok)
|
||||||
return strdup(tok);
|
return strdup(tok);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user