[at-spi2-atk] Remove some unneeded conditionals



commit 8b8e4d925d8fdf7a9bbf99c1d2cae10b2298668d
Author: Mike Gorse <mgorse suse com>
Date:   Tue Apr 12 11:38:58 2022 -0500

    Remove some unneeded conditionals
    
    DBUS_ERROR_UNKNOWN_OBJECT, etc. have been defined for more than a decade now.
    No need to check for them.

 droute/droute.c | 12 ------------
 1 file changed, 12 deletions(-)
---
diff --git a/droute/droute.c b/droute/droute.c
index bc03d741..2c698756 100644
--- a/droute/droute.c
+++ b/droute/droute.c
@@ -348,11 +348,7 @@ impl_prop_GetSet (DBusMessage *message,
     if (!prop_funcs)
       {
         DBusMessage *ret;
-#ifdef DBUS_ERROR_UNKNOWN_PROPERTY
         ret = dbus_message_new_error (message, DBUS_ERROR_UNKNOWN_PROPERTY, "Property unavailable");
-#else
-        ret = dbus_message_new_error (message, DBUS_ERROR_FAILED, "Property unavailable");
-#endif
         dbus_error_free (&error);
         return ret;
       }
@@ -390,12 +386,10 @@ impl_prop_GetSet (DBusMessage *message,
 
         reply = dbus_message_new_method_return (message);
       }
-#ifdef DBUS_ERROR_PROPERTY_READ_ONLY
     else if (!get)
       {
         reply = dbus_message_new_error (message, DBUS_ERROR_PROPERTY_READ_ONLY, "Property is read-only");
       }
-#endif
     else
       {
         reply = dbus_message_new_error (message, DBUS_ERROR_FAILED, "Getter or setter unavailable");
@@ -635,15 +629,9 @@ droute_object_does_not_exist_error (DBusMessage *message)
             dbus_message_get_signature (message),
             dbus_message_get_interface (message),
             dbus_message_get_path (message));
-#ifdef DBUS_ERROR_UNKNOWN_OBJECT
     reply = dbus_message_new_error (message,
                                     DBUS_ERROR_UNKNOWN_OBJECT,
                                     errmsg);
-#else
-    reply = dbus_message_new_error (message,
-                                    DBUS_ERROR_FAILED,
-                                    errmsg);
-#endif
     g_free (errmsg);
     return reply;
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]