aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Bultel <thierry.bultel@iot.bzh>2018-06-11 17:48:22 +0200
committerThierry Bultel <thierry.bultel@iot.bzh>2018-06-11 17:48:22 +0200
commit62beb2106316b8e72403d393499e18f7b1d191b8 (patch)
tree99e2a6eb871bf781ead26c0b528572442f40bc9a
parentb53304b2ff507801aeb19aa38291f328458e57e9 (diff)
Fixed latest commit
Wrong test on asprintf return code broke the app Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
-rw-r--r--plugins/alsa/alsa-api-streams.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/alsa/alsa-api-streams.c b/plugins/alsa/alsa-api-streams.c
index 3538426..5853414 100644
--- a/plugins/alsa/alsa-api-streams.c
+++ b/plugins/alsa/alsa-api-streams.c
@@ -328,10 +328,10 @@ STATIC int CreateOneStream(SoftMixerT *mixer, const char * uid, AlsaStreamAudioT
}
if (loop) {
- if (asprintf((char**) &stream->source, "hw:%d,%d,%d", captureDev->cardidx, loop->playback, capturePcm->cid.subdev))
+ if (asprintf((char**) &stream->source, "hw:%d,%d,%d", captureDev->cardidx, loop->playback, capturePcm->cid.subdev) == -1)
goto OnErrorExit;
} else {
- if (asprintf((char**) &stream->source, "hw:%d,%d,%d", captureDev->cardidx, captureDev->device, captureDev->subdev))
+ if (asprintf((char**) &stream->source, "hw:%d,%d,%d", captureDev->cardidx, captureDev->device, captureDev->subdev) == -1)
goto OnErrorExit;
}