mirror of
https://github.com/AuxXxilium/eudev.git
synced 2024-11-24 07:20:56 +07:00
udevadm: enclose invocation of unlinkat() with a (void) cast
Let's make Coverity happy about this one. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
This commit is contained in:
parent
5d4ffb7b7e
commit
6534505be7
@ -208,17 +208,15 @@ static void cleanup_dir(DIR *dir, mode_t mask, int depth) {
|
||||
if ((stats.st_mode & mask) != 0)
|
||||
continue;
|
||||
if (S_ISDIR(stats.st_mode)) {
|
||||
DIR *dir2;
|
||||
_cleanup_closedir_ DIR *dir2;
|
||||
|
||||
dir2 = fdopendir(openat(dirfd(dir), dent->d_name, O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC));
|
||||
if (dir2 != NULL) {
|
||||
if (dir2 != NULL)
|
||||
cleanup_dir(dir2, mask, depth-1);
|
||||
closedir(dir2);
|
||||
}
|
||||
unlinkat(dirfd(dir), dent->d_name, AT_REMOVEDIR);
|
||||
} else {
|
||||
unlinkat(dirfd(dir), dent->d_name, 0);
|
||||
}
|
||||
|
||||
(void) unlinkat(dirfd(dir), dent->d_name, AT_REMOVEDIR);
|
||||
} else
|
||||
(void) unlinkat(dirfd(dir), dent->d_name, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user