]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
driver: Remove unnecessary NULL check
authorPhilip Withnall <withnall@endlessm.com>
Thu, 2 Feb 2017 10:22:22 +0000 (10:22 +0000)
committerSimon McVittie <simon.mcvittie@collabora.co.uk>
Mon, 13 Feb 2017 14:51:00 +0000 (14:51 +0000)
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 <simon.mcvittie@collabora.co.uk>
bus/driver.c

index ae29df629a721cfcdfba2176aa7758b4a541e00a..34b86868ea19ccd0287cb45d4a1bedf6aad3e5b7 100644 (file)
@@ -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;