From e9023ad88c256b324c3e1b3db5b73bae8a21fac8 Mon Sep 17 00:00:00 2001 From: Deepika Aggarwal Date: Thu, 3 Dec 2015 11:22:56 +0530 Subject: [PATCH] Misuse of Enum in bus_config_load() during comparison Description: Comparison check improved with XML_STATUS_ERROR enum value check Signed-off-by: Deepika Aggarwal --- bus/config-loader-expat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bus/config-loader-expat.c b/bus/config-loader-expat.c index b571fda..5399fd2 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)) -- 1.7.9.5