bus: compare to negative errno
authorDave Reisner <dreisner@archlinux.org>
Wed, 20 Mar 2013 23:25:37 +0000 (19:25 -0400)
committerDave Reisner <dreisner@archlinux.org>
Wed, 20 Mar 2013 23:25:37 +0000 (19:25 -0400)
src/libsystemd-bus/bus-error.c

index f86da62..55b4187 100644 (file)
@@ -161,7 +161,7 @@ int bus_error_from_errno(sd_bus_error *e, int error) {
 
         if (error == -ENOMEM)
                 sd_bus_error_set_const(e, "org.freedesktop.DBus.Error.NoMemory", strerror(-error));
-        else if (error == -EPERM || error == EACCES)
+        else if (error == -EPERM || error == -EACCES)
                 sd_bus_error_set_const(e, "org.freedesktop.DBus.Error.AccessDenied", strerror(-error));
         else
                 sd_bus_error_set_const(e, "org.freedesktop.DBus.Error.Failed", "Operation failed");