[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] add a few curly braces
From: |
Gilles Casse |
Subject: |
[PATCH] add a few curly braces |
Date: |
Sun, 6 Sep 2009 22:31:56 +0200 |
Signed-off-by: Gilles Casse <gcasse at oralux.org>
---
src/audio/pulse.c | 21 ++++++++++++++-------
1 files changed, 14 insertions(+), 7 deletions(-)
diff --git a/src/audio/pulse.c b/src/audio/pulse.c
index 1e12c6f..55d183a 100644
--- a/src/audio/pulse.c
+++ b/src/audio/pulse.c
@@ -1271,45 +1271,52 @@ pulse_open(AudioID *id, void **pars)
/* Check if the server is running */
id->pulse_mainloop = pa_mainloop_new();
- if (id->pulse_mainloop == NULL)
+ if (id->pulse_mainloop == NULL) {
ERR("Failed to allocate main loop","");
ret = PULSE_ERROR;
goto fail;
+ }
id->pulse_context = pa_context_new(pa_mainloop_get_api(id->pulse_mainloop),
"speech-dispatcher");
- if (id->pulse_context == NULL)
+ if (id->pulse_context == NULL) {
ERR("Failed to allocate context","");
ret = PULSE_ERROR;
goto fail;
+ }
err = pa_context_connect(id->pulse_context, id->pulse_server, 0, NULL);
- if (err < 0)
+ if (err < 0) {
ERR("Failed to connect to server: %s",
pa_strerror(pa_context_errno(id->pulse_context)));
ret = PULSE_ERROR;
goto fail;
+ }
do {
err = pa_mainloop_prepare(id->pulse_mainloop, -1);
- if (err < 0)
+ if (err < 0) {
ret = PULSE_ERROR;
goto fail;
+ }
err = pa_mainloop_poll(id->pulse_mainloop);
- if (err < 0)
+ if (err < 0) {
ret = PULSE_ERROR;
goto fail;
+ }
err = pa_mainloop_dispatch(id->pulse_mainloop);
- if (err < 0)
+ if (err < 0) {
ret = PULSE_ERROR;
goto fail;
+ }
state = pa_context_get_state(id->pulse_context);
} while (state < PA_CONTEXT_AUTHORIZING);
- if (state > PA_CONTEXT_READY)
+ if (state > PA_CONTEXT_READY) {
ret = PULSE_ERROR;
goto fail;
+ }
SHOW("PulseAudio sound output opened\n","");
--
1.5.6.3
--------------080504030209040304040001--
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] add a few curly braces,
Gilles Casse <=