2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-31 22:35:33 +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

@@ -7,7 +7,7 @@
#include <signal.h>
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <sys/types.h>
#include <sys/statfs.h>
#include <dirent.h>
@@ -325,4 +325,9 @@ extern int run_scripts(char *action);
extern int cr_system(int in, int out, int err, char *cmd, char *const argv[]);
static inline bool dir_dots(struct dirent *de)
{
return !strcmp(de->d_name, ".") || !strcmp(de->d_name, "..");
}
#endif /* UTIL_H_ */