Skip to content
Snippets Groups Projects
Commit 51366d08 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont
Browse files

config: simplify expressions

No functional changes.
parent 6911b612
No related branches found
No related tags found
1 merge request!959Read-Copy-Update API (and initial user)
......@@ -481,16 +481,18 @@ int config_SaveConfigFile (vlc_object_t *p_this)
}
else
{
const char *psz_value = p_item->value.psz;
bool modified;
assert (IsConfigStringType (p_item->i_type));
modified = !!strcmp (psz_value ? psz_value : "",
p_item->orig.psz ? p_item->orig.psz : "");
config_Write (file, p_item->psz_text, N_("string"),
!modified, p_item->psz_name, "%s",
psz_value ? psz_value : "");
const char *val = p_item->value.psz;
const char *orig = p_item->orig.psz;
if (val == NULL)
val = "";
if (orig == NULL)
orig = "";
assert(IsConfigStringType(p_item->i_type));
config_Write(file, p_item->psz_text, N_("string"),
strcmp(val, orig) == 0, p_item->psz_name, "%s",
val);
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment