diff options
Diffstat (limited to 'src/shared/barrier.c')
-rw-r--r-- | src/shared/barrier.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/shared/barrier.c b/src/shared/barrier.c index 79316dd4c2..bb5869dad4 100644 --- a/src/shared/barrier.c +++ b/src/shared/barrier.c @@ -151,8 +151,6 @@ void barrier_destroy(Barrier *b) { * this is currently not needed so it hasn't been implemented. */ void barrier_set_role(Barrier *b, unsigned role) { - int fd; - assert(b); assert(IN_SET(role, BARRIER_PARENT, BARRIER_CHILD)); /* make sure this is only called once */ @@ -164,9 +162,7 @@ void barrier_set_role(Barrier *b, unsigned role) { b->pipe[0] = safe_close(b->pipe[0]); /* swap me/them for children */ - fd = b->me; - b->me = b->them; - b->them = fd; + SWAP_TWO(b->me, b->them); } } |