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:
@@ -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_ */
|
||||
|
Reference in New Issue
Block a user