PolicyKit: Branch 'master'
Danny Kukawka
dkukawka at kemper.freedesktop.org
Thu Aug 23 05:23:16 PDT 2007
polkit-dbus/polkit-dbus.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
diff-tree c27e93f7faf2901cbd0d3cd5b4bd9ce87f8ca7cb (from 0d69cdc59f51fda93c857171b69ac8f3fe46b745)
Author: Danny Kukawka <danny.kukawka at web.de>
Date: Thu Aug 23 14:23:02 2007 +0200
fixed compiler warning about uid_t handling
This fixes the same problem with uid_t as we had with HAL some time ago
on 64bit architectures in PolicyKit. This time I removed the useless check:
uid == ((unsigned long) -1)
because this is always false on 64bit (comparison is always false due to
limited range of data type) and because the DBusError from the
dbus_bus_get_unix_user() call is set if the function returns DBUS_UID_UNSET
so we need only to check if the error is set.
diff --git a/polkit-dbus/polkit-dbus.c b/polkit-dbus/polkit-dbus.c
index ce6573c..7d35a0d 100644
--- a/polkit-dbus/polkit-dbus.c
+++ b/polkit-dbus/polkit-dbus.c
@@ -389,7 +389,7 @@ polkit_caller_new_from_dbus_name (DBusCo
session = NULL;
uid = dbus_bus_get_unix_user (con, dbus_name, error);
- if (uid == ((unsigned long) -1) || dbus_error_is_set (error)) {
+ if (dbus_error_is_set (error)) {
g_warning ("Could not get uid for connection: %s %s", error->name, error->message);
goto out;
}
More information about the hal-commit
mailing list