X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fshared%2Fbarrier.c;h=436ba9598910a861b59312effa26622f7cdee1c8;hp=ec121d74035d3a8a2d7f802e7c1d8514842f61db;hb=86e97d599f8b1ca379dce64fadac9b8f6b002ac5;hpb=2eec67acbb00593e414549a7e5b35eb7dd776b1b diff --git a/src/shared/barrier.c b/src/shared/barrier.c index ec121d740..436ba9598 100644 --- a/src/shared/barrier.c +++ b/src/shared/barrier.c @@ -138,7 +138,7 @@ int barrier_create(Barrier *b) { * barrier_create(). The object is released and reset to invalid * state. Therefore, it is safe to call barrier_destroy() multiple * times or even if barrier_create() failed. However, barrier must be - * always initalized with BARRIER_NULL. + * always initialized with BARRIER_NULL. * * If @b is NULL, this is a no-op. */ @@ -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]);