From ff1d8104e230b3d2da67d79211b3803d22a42b72 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Thu, 1 Jan 2015 22:16:34 +0200 Subject: [PATCH] D-Bus: Remove the obsolete notes from wpas_dbus_error_unknown_error() Commit 6aeeb6fa21bc072ba92ce9423ba5c0417e8c0bf5 ('dbus: clean up new D-Bus interface getters and setters') redesigned the property getter/setter calls in a way that made the wpas_dbus_error_unknown_error() note about message being NULL in some cases obsolete. All the remaining callers are from method handler functions that must have a valid message. Remove the obsolete notes and unnecessary messsage == NULL check. Signed-off-by: Jouni Malinen --- wpa_supplicant/dbus/dbus_new_handlers.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/wpa_supplicant/dbus/dbus_new_handlers.c b/wpa_supplicant/dbus/dbus_new_handlers.c index bdaddb679..c2fabdf2c 100644 --- a/wpa_supplicant/dbus/dbus_new_handlers.c +++ b/wpa_supplicant/dbus/dbus_new_handlers.c @@ -35,7 +35,7 @@ static const char * const debug_strings[] = { /** - * wpas_dbus_error_unknown_error - Return a new InvalidArgs error message + * wpas_dbus_error_unknown_error - Return a new UnknownError error message * @message: Pointer to incoming dbus message this error refers to * @arg: Optional string appended to error message * Returns: a dbus error message @@ -45,20 +45,6 @@ static const char * const debug_strings[] = { DBusMessage * wpas_dbus_error_unknown_error(DBusMessage *message, const char *arg) { - /* - * This function can be called as a result of a failure - * within internal getter calls, which will call this function - * with a NULL message parameter. However, dbus_message_new_error - * looks very unkindly (i.e, abort()) on a NULL message, so - * in this case, we should not call it. - */ - if (message == NULL) { - wpa_printf(MSG_INFO, - "dbus: %s called with NULL message (arg=%s)", - __func__, arg ? arg : "N/A"); - return NULL; - } - return dbus_message_new_error(message, WPAS_DBUS_ERROR_UNKNOWN_ERROR, arg); }