From 39679ccdcefd18f78d3e8997ce4cf112f39aadb0 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Wed, 28 Jun 2017 06:58:01 +0200 Subject: [PATCH] (oss.c) Silence some Coverity warnings --- audio/drivers/oss.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/audio/drivers/oss.c b/audio/drivers/oss.c index 1f8b25cb87..d6d4d28ffa 100644 --- a/audio/drivers/oss.c +++ b/audio/drivers/oss.c @@ -120,7 +120,9 @@ static bool oss_stop(void *data) { int *fd = (int*)data; - ioctl(*fd, SNDCTL_DSP_RESET, 0); + if (ioctl(*fd, SNDCTL_DSP_RESET, 0) < 0) + return false; + oss_is_paused = true; return true; } @@ -155,7 +157,9 @@ static void oss_free(void *data) { int *fd = (int*)data; - ioctl(*fd, SNDCTL_DSP_RESET, 0); + if (ioctl(*fd, SNDCTL_DSP_RESET, 0) < 0) + return; + close(*fd); free(fd); }