From: Deepika Aggarwal Date: Thu, 3 Dec 2015 05:52:56 +0000 (+0530) Subject: Be explicit about enum comparison in bus_config_load() X-Git-Tag: dbus-1.11.4~37 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b36708830b8a0e5c1166a882cba5bbe7afa966ca;p=thirdparty%2Fdbus.git Be explicit about enum comparison in bus_config_load() XML_Parse() can potentially return values other than OK (1) or ERROR (0), and they aren't errors. Signed-off-by: Deepika Aggarwal Bug: https://bugs.freedesktop.org/show_bug.cgi?id=93205 [smcv: improve commit message, fix whitespace] Reviewed-by: Simon McVittie --- diff --git a/bus/config-loader-expat.c b/bus/config-loader-expat.c index b571fda31..901969734 100644 --- a/bus/config-loader-expat.c +++ b/bus/config-loader-expat.c @@ -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))