chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Introduce loop_read_exact helper
[elogind.git]
/
src
/
shared
/
barrier.c
diff --git
a/src/shared/barrier.c
b/src/shared/barrier.c
index f65363a67b11ab9bc625a21b47aeb5caa182f6c5..a0326ac697367558acdcc1eabf94881ae74df90e 100644
(file)
--- a/
src/shared/barrier.c
+++ b/
src/shared/barrier.c
@@
-21,13
+21,10
@@
#include <errno.h>
#include <fcntl.h>
#include <errno.h>
#include <fcntl.h>
-#include <limits.h>
#include <poll.h>
#include <stdbool.h>
#include <stdint.h>
#include <poll.h>
#include <stdbool.h>
#include <stdint.h>
-#include <stdio.h>
#include <stdlib.h>
#include <stdlib.h>
-#include <string.h>
#include <sys/eventfd.h>
#include <sys/types.h>
#include <unistd.h>
#include <sys/eventfd.h>
#include <sys/types.h>
#include <unistd.h>
@@
-178,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);
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]);
if (role == BARRIER_PARENT)
b->pipe[1] = safe_close(b->pipe[1]);