- libraspi: some manual code nicenings

Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
svenhoefer
2021-11-07 00:57:01 +01:00
committed by Thilo Graf
parent 945bf0cd37
commit 3d7716ef08
12 changed files with 107 additions and 199 deletions

View File

@@ -270,8 +270,7 @@ void cRecord::RecordThread()
if (toread > readsize)
toread = readsize;
ssize_t s = dmx->Read(buf + buf_pos, toread, 50);
hal_debug("%s: buf_pos %6d s %6d / %6d\n", __func__,
buf_pos, (int)s, bufsize - buf_pos);
hal_debug("%s: buf_pos %6d s %6d / %6d\n", __func__, buf_pos, (int)s, bufsize - buf_pos);
if (s < 0)
{
if (errno != EAGAIN && (errno != EOVERFLOW || !overflow))
@@ -312,7 +311,7 @@ void cRecord::RecordThread()
hal_debug("%s: aio in progress, free: %d\n", __func__, bufsize - buf_pos);
continue;
}
// not calling aio_return causes a memory leak --martii
// not calling aio_return causes a memory leak --martii
r = aio_return(&a);
if (r < 0)
{