2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-09-01 14:55:39 +00:00

fd: Consolidate . and .. checks in various readdir callers

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Pavel Emelyanov
2012-11-29 21:12:51 +03:00
parent 86886b6376
commit 1a7c7d0404
4 changed files with 10 additions and 13 deletions

View File

@@ -507,9 +507,7 @@ static int close_old_fds(struct pstree_item *me)
return -1;
while ((de = readdir(dir))) {
if (!strcmp(de->d_name, "."))
continue;
if (!strcmp(de->d_name, ".."))
if (dir_dots(de))
continue;
ret = sscanf(de->d_name, "%d", &fd);