]> err.no Git - systemd/commitdiff
udev: fix rules sort order
authorTom Gundersen <teg@jklm.no>
Sat, 7 Apr 2012 11:41:13 +0000 (13:41 +0200)
committerKay Sievers <kay@vrfy.org>
Sun, 8 Apr 2012 14:09:42 +0000 (16:09 +0200)
Commit 91418155ae9034f466d436c314cd136309bc557d moved around the code,
but did not chang ethe array index.

src/udev/libudev.c

index 755d84d9bf0c1085503fbdb038c0a72fad08a663..74b53cbf1b59e7bcdb0b353081f6df4e0decca8a 100644 (file)
@@ -261,12 +261,12 @@ _public_ struct udev *udev_new(void)
                         goto err;
 
                 /* /run/udev -- runtime rules */
-                if (asprintf(&udev->rules_path[2], "%s/rules.d", udev->run_path) < 0)
+                if (asprintf(&udev->rules_path[1], "%s/rules.d", udev->run_path) < 0)
                         goto err;
 
                 /* /etc/udev -- local administration rules */
-                udev->rules_path[1] = strdup(SYSCONFDIR "/udev/rules.d");
-                if (!udev->rules_path[1])
+                udev->rules_path[2] = strdup(SYSCONFDIR "/udev/rules.d");
+                if (!udev->rules_path[2])
                         goto err;
 
                 udev->rules_path_count = 3;