]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
Be explicit about enum comparison in bus_config_load()
authorDeepika Aggarwal <deepika.a@samsung.com>
Thu, 3 Dec 2015 05:52:56 +0000 (11:22 +0530)
committerSimon McVittie <simon.mcvittie@collabora.co.uk>
Fri, 1 Jul 2016 15:46:04 +0000 (16:46 +0100)
XML_Parse() can potentially return values other than OK (1) or ERROR (0),
and they aren't errors.

Signed-off-by: Deepika Aggarwal <deepika.a@samsung.com>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=93205
[smcv: improve commit message, fix whitespace]
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
bus/config-loader-expat.c

index b571fda3181fd39eac73e8dd1d48d78fdf780fb9..901969734c3c9351f5ac583c9c8bcb527d5f5fdf 100644 (file)
@@ -242,7 +242,7 @@ bus_config_load (const DBusString      *file,
 
     data_str = _dbus_string_get_const_data (&data);
 
-    if (!XML_Parse (expat, data_str, _dbus_string_get_length (&data), TRUE))
+    if (XML_Parse (expat, data_str, _dbus_string_get_length (&data), TRUE) == XML_STATUS_ERROR)
       {
         if (context.error != NULL &&
             !dbus_error_is_set (context.error))