From 16345a139a653397979b69d04c01e4026ab46ef4 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 1 Feb 2024 01:49:54 +0100 Subject: [PATCH] make alsapcm_read()'s return value preparation clearer ... by nesting the success case into the != -EPIPE block. --- alsaaudio.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/alsaaudio.c b/alsaaudio.c index 2218050..e69a3f5 100644 --- a/alsaaudio.c +++ b/alsaaudio.c @@ -1385,10 +1385,10 @@ alsapcm_read(alsapcm_t *self, PyObject *args) Py_DECREF(buffer_obj); return NULL; } - } - - if (res > 0 ) { - sizeout = res * self->framesize; + else + { + sizeout = res * self->framesize; + } } if (size != sizeout) {