diff options
author | Cristian RodrÃguez <crrodriguez@opensuse.org> | 2015-02-20 15:14:56 -0300 |
---|---|---|
committer | David Herrmann <dh.herrmann@gmail.com> | 2015-02-24 18:30:59 +0100 |
commit | 3f7f1fad7621f584d9ce024abb313ecbc9bd0e62 (patch) | |
tree | e6063588b533a89255b2da5fb8db2c5b54d133f7 /src/shared/barrier.c | |
parent | 43bbf1acc8202de895e5449828a7b863c69fcc2f (diff) |
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);
Diffstat (limited to 'src/shared/barrier.c')
-rw-r--r-- | src/shared/barrier.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/barrier.c b/src/shared/barrier.c index ec121d7403..a0326ac697 100644 --- a/src/shared/barrier.c +++ b/src/shared/barrier.c @@ -175,7 +175,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]); |