From: Philip Withnall Date: Thu, 2 Feb 2017 10:22:22 +0000 (+0000) Subject: driver: Remove unnecessary NULL check X-Git-Tag: dbus-1.11.10~30 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2ab6913e7946be7cdf8111b5691c3a4db3dac248;p=thirdparty%2Fdbus.git driver: Remove unnecessary NULL check context is definitely non-NULL at this point, and has been dereferenced already on all paths leading to it. Coverity ID: 141062 Bug: https://bugs.freedesktop.org/show_bug.cgi?id=99642 Reviewed-by: Simon McVittie --- diff --git a/bus/driver.c b/bus/driver.c index ae29df629..34b86868e 100644 --- a/bus/driver.c +++ b/bus/driver.c @@ -1356,7 +1356,7 @@ bus_driver_handle_add_match (DBusConnection *connection, if (rule == NULL) goto failed; - bustype = context ? bus_context_get_type (context) : NULL; + bustype = bus_context_get_type (context); if (bus_match_rule_get_client_is_eavesdropping (rule) && !bus_apparmor_allows_eavesdropping (connection, bustype, error)) goto failed;