From 3ce252d0e0ccc4b21ea34baa83febb856d96f30c Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 7 Jan 2020 18:02:53 +0100 Subject: udev: use dot_or_dot_dot() where appropriate --- src/udev/udev-builtin-net_id.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/udev') diff --git a/src/udev/udev-builtin-net_id.c b/src/udev/udev-builtin-net_id.c index e94fff2520..169d6ce8f7 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; -- cgit v1.2.3