summaryrefslogtreecommitdiff
path: root/gio/gsettings.c
diff options
context:
space:
mode:
authorLars Uebernickel <lars@uebernic.de>2013-12-08 17:30:33 +0100
committerLars Uebernickel <lars@uebernic.de>2013-12-09 15:51:56 +0100
commit0f1579e62cded436c3fbfbeaf3130c8d8ffcb01c (patch)
treea129c4262b002a7798fef19514a331fa445c70ba /gio/gsettings.c
parent05f36e7ffcac0e58c1bf578bc37e1dc129f4b8e3 (diff)
g_settings_get: only check for non-copying format string
396d40af introduced a redundant call to g_variant_check_format_string(). Checking whether the format string copies all values is enough. https://bugzilla.gnome.org/show_bug.cgi?id=719979
Diffstat (limited to 'gio/gsettings.c')
-rw-r--r--gio/gsettings.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gio/gsettings.c b/gio/gsettings.c
index 62a170801..4a1344335 100644
--- a/gio/gsettings.c
+++ b/gio/gsettings.c
@@ -1528,9 +1528,9 @@ g_settings_get (GSettings *settings,
value = g_settings_get_value (settings, key);
- if (!g_variant_check_format_string (value, format, TRUE))
+ if (strchr (format, '&'))
{
- g_critical ("%s: invalid format string for key '%s' from schema '%s'. "
+ g_critical ("%s: the format string may not contain '&' (key '%s' from schema '%s'). "
"This call will probably stop working with a future version of glib.",
G_STRFUNC, key, g_settings_schema_get_id (settings->priv->schema));
}