From: Simon McVittie Date: Thu, 13 Oct 2016 22:03:08 +0000 (+0100) Subject: Bus driver: add default BusDriverFound switch cases X-Git-Tag: dbus-1.11.10~51 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=52326d47213aff9d716b697ef2cc87c287983387;p=thirdparty%2Fdbus.git 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 --- diff --git a/bus/driver.c b/bus/driver.c index 83e8ead42..ae29df629 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; }