mirror of
https://github.com/clearlinux/systemd-stable.git
synced 2026-09-08 14:41:51 +00:00
shared: fix wrong assertion in barrier_set_role()
assert(b->pipe[0] >= 0 && b->pipe[0] >= 0);
Test the same condition twice, pretty sure we mean
assert(b->pipe[0] >= 0 && b->pipe[1] >= 0);
(cherry picked from commit 3f7f1fad76)
This commit is contained in:
committed by
Zbigniew Jędrzejewski-Szmek
parent
6af0a4ba45
commit
cf0e4940ea
@@ -178,7 +178,7 @@ void barrier_set_role(Barrier *b, unsigned int role) {
|
||||
assert(b);
|
||||
assert(role == BARRIER_PARENT || role == BARRIER_CHILD);
|
||||
/* make sure this is only called once */
|
||||
assert(b->pipe[1] >= 0 && b->pipe[1] >= 0);
|
||||
assert(b->pipe[0] >= 0 && b->pipe[1] >= 0);
|
||||
|
||||
if (role == BARRIER_PARENT)
|
||||
b->pipe[1] = safe_close(b->pipe[1]);
|
||||
|
||||
Reference in New Issue
Block a user