summaryrefslogtreecommitdiff
path: root/src/nspawn/nspawn.c
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/nspawn/nspawn.c
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/nspawn/nspawn.c')
-rw-r--r--src/nspawn/nspawn.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
index 657512d661..7c47f6ecd2 100644
--- a/src/nspawn/nspawn.c
+++ b/src/nspawn/nspawn.c
@@ -3073,13 +3073,13 @@ int main(int argc, char *argv[]) {
for (;;) {
ContainerStatus container_status;
- _cleanup_(barrier_destroy) Barrier barrier = { };
+ _cleanup_(barrier_destroy) Barrier barrier = BARRIER_NULL;
struct sigaction sa = {
.sa_handler = nop_handler,
.sa_flags = SA_NOCLDSTOP,
};
- r = barrier_init(&barrier);
+ r = barrier_create(&barrier);
if (r < 0) {
log_error("Cannot initialize IPC barrier: %s", strerror(-r));
goto finish;