[systemd-commits] src/shared

David Herrmann dvdhrm at kemper.freedesktop.org
Tue Feb 24 09:36:55 PST 2015


 src/shared/barrier.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 3f7f1fad7621f584d9ce024abb313ecbc9bd0e62
Author: Cristian Rodríguez <crrodriguez at opensuse.org>
Date:   Fri Feb 20 15:14:56 2015 -0300

    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);

diff --git a/src/shared/barrier.c b/src/shared/barrier.c
index ec121d7..a0326ac 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]);



More information about the systemd-commits mailing list