]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
udev: use dot_or_dot_dot() where appropriate 14510/head
authorLennart Poettering <lennart@poettering.net>
Tue, 7 Jan 2020 17:02:53 +0000 (18:02 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 7 Jan 2020 17:02:53 +0000 (18:02 +0100)
src/udev/udev-builtin-net_id.c

index e94fff2520cb195000eab78cd755bab3063efe7f..169d6ce8f7cb2e164baa6f988882cf8e74d6d098 100644 (file)
@@ -330,8 +330,9 @@ static int dev_pci_slot(sd_device *dev, struct netnames *names) {
                         char str[PATH_MAX];
                         _cleanup_free_ char *address = NULL;
 
-                        if (dent->d_name[0] == '.')
+                        if (dot_or_dot_dot(dent->d_name))
                                 continue;
+
                         r = safe_atou_full(dent->d_name, 10, &i);
                         if (r < 0 || i <= 0)
                                 continue;