libraspi: some manual code nicenings

Origin commit data
------------------
Branch: master
Commit: 4e5af3aef5
Author: vanhofen <vanhofen@gmx.de>
Date: 2021-11-07 (Sun, 07 Nov 2021)

Origin message was:
------------------
- libraspi: some manual code nicenings

------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2021-11-07 00:57:01 +01:00
parent ae20eb0654
commit 1354bbca91
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)
{