chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
43bbf1a
)
shared: fix wrong assertion in barrier_set_role()
author
Cristian RodrÃguez
<crrodriguez@opensuse.org>
Fri, 20 Feb 2015 18:14:56 +0000
(15:14 -0300)
committer
David Herrmann
<dh.herrmann@gmail.com>
Tue, 24 Feb 2015 17:30:59 +0000
(18:30 +0100)
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);
src/shared/barrier.c
patch
|
blob
|
history
diff --git
a/src/shared/barrier.c
b/src/shared/barrier.c
index ec121d74035d3a8a2d7f802e7c1d8514842f61db..a0326ac697367558acdcc1eabf94881ae74df90e 100644
(file)
--- 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]);