summaryrefslogtreecommitdiff
path: root/src/boot
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-04-24 13:44:09 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-04-24 14:10:27 +0200
commitb1c05b98bfbfd967ddeaad1c7f827153989013b8 (patch)
treec3a177237ccf0efc94e8ff7467c1eccf66390e2b /src/boot
parent9169e4c7ba0cd2443fd4760b43715cb6d991c784 (diff)
downloadsystemd-b1c05b98bfbfd967ddeaad1c7f827153989013b8.tar.gz
tree-wide: avoid assignment of r just to use in a comparison
This changes r = ...; if (r < 0) to if (... < 0) when r will not be used again.
Diffstat (limited to 'src/boot')
-rw-r--r--src/boot/bootctl.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/boot/bootctl.c b/src/boot/bootctl.c
index 294d5922cf..b9659d4860 100644
--- a/src/boot/bootctl.c
+++ b/src/boot/bootctl.c
@@ -428,8 +428,7 @@ static int copy_file_with_version_check(const char *from, const char *to, bool f
(void) fsync_directory_of_file(fd_to);
- r = renameat(AT_FDCWD, t, AT_FDCWD, to);
- if (r < 0) {
+ if (renameat(AT_FDCWD, t, AT_FDCWD, to) < 0) {
(void) unlink_noerrno(t);
return log_error_errno(errno, "Failed to rename \"%s\" to \"%s\": %m", t, to);
}