]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
udevadm-test: fix gid check
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 7 Feb 2025 02:07:37 +0000 (11:07 +0900)
committerLuca Boccassi <luca.boccassi@gmail.com>
Sat, 8 Feb 2025 11:29:32 +0000 (11:29 +0000)
Fixes a bug introduced by 03b6879f4d45c49264708aef872fd05af30ddcf0.

Based on the upstream commit e66d4ea31ad3812fdd7a0f1cdcc3b941cedf542a.

src/udev/udevadm-test.c

index 748bcaf36481bbc58a89a9ae7386783cc0c159df..574745c42c12735aca1911a20ae05d2a664bcf20 100644 (file)
@@ -166,7 +166,7 @@ int test_main(int argc, char *argv[], void *userdata) {
                 }
 
                 gid_t gid = event->gid;
-                if (!gid_is_valid(uid))
+                if (!gid_is_valid(gid))
                         (void) device_get_devnode_gid(dev, &gid);
                 if (gid_is_valid(gid)) {
                         _cleanup_free_ char *group = gid_to_name(gid);