From fba5a00dc3a94de5e0712416b0a0c071c99af1bb Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Thu, 13 Oct 2016 23:03:08 +0100 Subject: [PATCH 6/6] Bus driver: add default BusDriverFound switch cases If we get an impossible result, treat it as BUS_DRIVER_FOUND_ERROR. Signed-off-by: Simon McVittie --- bus/driver.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bus/driver.c b/bus/driver.c index 83e8ead..ae29df6 100644 --- a/bus/driver.c +++ b/bus/driver.c @@ -1659,6 +1659,8 @@ bus_driver_handle_get_connection_unix_user (DBusConnection *connection, uid = DBUS_UID_UNSET; break; case BUS_DRIVER_FOUND_ERROR: + /* fall through */ + default: goto failed; } @@ -1726,6 +1728,8 @@ bus_driver_handle_get_connection_unix_process_id (DBusConnection *connection, pid = DBUS_PID_UNSET; break; case BUS_DRIVER_FOUND_ERROR: + /* fall through */ + default: goto failed; } @@ -1923,6 +1927,8 @@ bus_driver_handle_get_connection_credentials (DBusConnection *connection, ulong_uid = DBUS_UID_UNSET; break; case BUS_DRIVER_FOUND_ERROR: + /* fall through */ + default: goto failed; } -- 2.9.3