1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-05 15:21:37 +03:00

udev: use dot_or_dot_dot() where appropriate

This commit is contained in:
Lennart Poettering 2020-01-07 18:02:53 +01:00
parent a1686563de
commit 3ce252d0e0

View 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;