summaryrefslogtreecommitdiffstats
path: root/src/shared/barrier.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2022-11-22 12:14:33 +0100
committerLennart Poettering <lennart@poettering.net>2022-11-22 13:05:29 +0100
commit108dfff2c7aebadb78e485ed564caf559367bf7c (patch)
tree40ea2233261eb292f53c263017975c4c6d36c3b5 /src/shared/barrier.c
parentman: update docs for MemoryZSwapMax= (diff)
downloadsystemd-108dfff2c7aebadb78e485ed564caf559367bf7c.tar.xz
systemd-108dfff2c7aebadb78e485ed564caf559367bf7c.zip
tree-wide: modernizations with RET_NERRNO()
Diffstat (limited to 'src/shared/barrier.c')
-rw-r--r--src/shared/barrier.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/shared/barrier.c b/src/shared/barrier.c
index cbe54a60cd..d76a61a5db 100644
--- a/src/shared/barrier.c
+++ b/src/shared/barrier.c
@@ -92,7 +92,6 @@
*/
int barrier_create(Barrier *b) {
_unused_ _cleanup_(barrier_destroyp) Barrier *staging = b;
- int r;
assert(b);
@@ -104,8 +103,7 @@ int barrier_create(Barrier *b) {
if (b->them < 0)
return -errno;
- r = pipe2(b->pipe, O_CLOEXEC | O_NONBLOCK);
- if (r < 0)
+ if (pipe2(b->pipe, O_CLOEXEC | O_NONBLOCK) < 0)
return -errno;
staging = NULL;