1
0
mirror of https://github.com/irssi/irssi.git synced 2024-12-04 14:46:39 -05:00

Use strarray_find instead of g_strv_contains

This commit is contained in:
LemonBoy 2016-06-12 16:38:34 +02:00
parent 86c5e56ef4
commit 31f12c10df

View File

@ -387,7 +387,7 @@ gboolean settings_set_choice(const char *key, const char *value)
rec = settings_get_record(key);
/* XXX: The leading/trailing whitespace makes the test fail */
if (rec != NULL && g_strv_contains((const char **)rec->choices, value) == FALSE) {
if (rec != NULL && strarray_find(rec->choices, value) < 0) {
char *msg = g_strjoinv(",", rec->choices);
g_warning("Invalid value for '%s', must be one of: %s", key, msg);
g_free(msg);