chiark / gitweb /
rules: switch to built-in blkid
[elogind.git] / extras / udev-acl / udev-acl.c
index 31e9991a51dded24a131409e6dac63cba1a35e2c..41e2536e037da002490cc15eaf331dbdbaa5a65d 100644 (file)
@@ -258,11 +258,6 @@ static int consolekit_called(const char *ck_action, uid_t *uid, uid_t *uid2, con
                        u = u2;
                }
                break;
-       case ACTION_NONE:
-               break;
-       default:
-               g_assert_not_reached();
-               break;
        }
 
        *remove_session_id = old_session;
@@ -293,8 +288,10 @@ static void apply_acl_to_devices(uid_t uid, int add)
                if (device == NULL)
                        continue;
                node = udev_device_get_devnode(device);
-               if (node == NULL)
+               if (node == NULL) {
+                       udev_device_unref(device);
                        continue;
+               }
                set_facl(node, uid, add);
                udev_device_unref(device);
        }
@@ -364,7 +361,6 @@ int main (int argc, char* argv[])
                        break;
                case 'h':
                        printf("Usage: udev-acl --action=ACTION [--device=DEVICEFILE] [--user=UID]\n\n");
-               default:
                        goto out;
                }
        }