From 3ce252d0e0ccc4b21ea34baa83febb856d96f30c Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 7 Jan 2020 18:02:53 +0100 Subject: [PATCH] udev: use dot_or_dot_dot() where appropriate --- src/udev/udev-builtin-net_id.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/udev/udev-builtin-net_id.c b/src/udev/udev-builtin-net_id.c index e94fff2520c..169d6ce8f7c 100644 --- a/src/udev/udev-builtin-net_id.c +++ b/src/udev/udev-builtin-net_id.c @@ -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;