aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTaylor Holberton <taylorcholberton@gmail.com>2016-11-18 20:38:40 -0800
committerTaylor Holberton <taylorcholberton@gmail.com>2016-11-18 20:38:40 -0800
commit2386a422c14195666215d78214446217be34640d (patch)
tree01f2353436202cc3553060b9bffbce356516de6f
parenteccd781875925157a01a755d555b7e1e6d80fae1 (diff)
initializing 'result' from transfer struct
-rw-r--r--src/pcm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pcm.c b/src/pcm.c
index bb907b6..b4b4be1 100644
--- a/src/pcm.c
+++ b/src/pcm.c
@@ -495,7 +495,7 @@ int pcm_write(struct pcm *pcm, const void *data, unsigned int count)
x.buf = (void*)data;
x.frames = count / (pcm->config.channels *
pcm_format_to_bits(pcm->config.format) / 8);
-
+ x.result = 0;
for (;;) {
if (!pcm->running) {
int prepare_error = pcm_prepare(pcm);
@@ -544,7 +544,7 @@ int pcm_read(struct pcm *pcm, void *data, unsigned int count)
x.buf = data;
x.frames = count / (pcm->config.channels *
pcm_format_to_bits(pcm->config.format) / 8);
-
+ x.result = 0;
for (;;) {
if (!pcm->running) {
if (pcm_start(pcm) < 0) {