mirror of
https://github.com/systemd/systemd.git
synced 2025-03-31 14:50:15 +03:00
copy: wrap some unlink() calls in (void) casts
This commit is contained in:
parent
858749f731
commit
7b938dfb8d
@ -239,7 +239,7 @@ static int fd_copy_regular(
|
||||
|
||||
r = copy_bytes(fdf, fdt, (uint64_t) -1, copy_flags);
|
||||
if (r < 0) {
|
||||
unlinkat(dt, to, 0);
|
||||
(void) unlinkat(dt, to, 0);
|
||||
return r;
|
||||
}
|
||||
|
||||
@ -261,7 +261,7 @@ static int fd_copy_regular(
|
||||
|
||||
if (q < 0) {
|
||||
r = -errno;
|
||||
unlinkat(dt, to, 0);
|
||||
(void) unlinkat(dt, to, 0);
|
||||
}
|
||||
|
||||
return r;
|
||||
@ -525,7 +525,7 @@ int copy_file(const char *from, const char *to, int flags, mode_t mode, unsigned
|
||||
r = copy_file_fd(from, fdt, copy_flags);
|
||||
if (r < 0) {
|
||||
close(fdt);
|
||||
unlink(to);
|
||||
(void) unlink(to);
|
||||
return r;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user