projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
858749f
)
copy: wrap some unlink() calls in (void) casts
author
Lennart Poettering
<lennart@poettering.net>
Fri, 9 Feb 2018 08:50:13 +0000
(09:50 +0100)
committer
Lennart Poettering
<lennart@poettering.net>
Mon, 12 Feb 2018 10:07:55 +0000
(11:07 +0100)
src/basic/copy.c
patch
|
blob
|
history
diff --git
a/src/basic/copy.c
b/src/basic/copy.c
index
0673ecd
..
a9e1a87
100644
(file)
--- a/
src/basic/copy.c
+++ b/
src/basic/copy.c
@@
-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;
}