summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-07-18 20:12:13 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-07-18 20:12:44 -0400
commit7566e26721ee95d6fc864e9e6654fb61bd3cd603 (patch)
tree4ac5f457cee12ccbea45f5c90eabe76cbd1444be /src/test
parentcbd4560ea2c9f0ae77df1fc64685ff4e559810b6 (diff)
barrier: initalize file descriptors with -1
Explicitly initalize descriptors using explicit assignment like bus_error. This makes barriers follow the same conventions as everything else and makes things a bit simpler too. Rename barier_init to barier_create so it is obvious that it is not about initialization. Remove some parens, etc.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/test-barrier.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/test-barrier.c b/src/test/test-barrier.c
index 640e508679..672a51e2c3 100644
--- a/src/test/test-barrier.c
+++ b/src/test/test-barrier.c
@@ -59,10 +59,10 @@ static void msleep(unsigned long msecs) {
#define TEST_BARRIER(_FUNCTION, _CHILD_CODE, _WAIT_CHILD, _PARENT_CODE, _WAIT_PARENT) \
static void _FUNCTION(void) { \
- Barrier b; \
+ Barrier b = BARRIER_NULL; \
pid_t pid1, pid2; \
\
- assert_se(barrier_init(&b) >= 0); \
+ assert_se(barrier_create(&b) >= 0); \
\
pid1 = fork(); \
assert_se(pid1 >= 0); \