<p><b>@smlng</b> commented on this pull request.</p>

<hr>

<p>In <a href="https://github.com/RIOT-OS/RIOT/pull/11634#discussion_r290712584">sys/tsrb/tsrb.c</a>:</p>
<pre style='color:#555'>>  {
     rb->buf[rb->writes++ & (rb->size - 1)] = c;
 }
 
-static char _pop(tsrb_t *rb)
+static uint8_t _pop(tsrb_t *rb)
 {
     return rb->buf[rb->reads++ & (rb->size - 1)];
 }
 
 int tsrb_get_one(tsrb_t *rb)
</pre>
<p><a class="user-mention" data-hovercard-type="user" data-hovercard-url="/hovercards?user_id=4679640" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/kaspar030">@kaspar030</a>: oversaw the increment of <code>reads</code> so one MUST check if ring buffer not empty before any <code>get</code> operation. But then we could actually simplify the API by removing <code>tsrb_empty</code> and <code>tsrb_full</code> because they have no value to the user as s/he can just call <code>tsrb_get*</code> or <code>tsrb_add*</code> and check for errors.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/RIOT-OS/RIOT/pull/11634?email_source=notifications&email_token=ABE7WYA6GFW6FNAZP25OUGDPY6WT3A5CNFSM4HTU3XKKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOB2UUASY#discussion_r290712584">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABE7WYDXSKHLOYIV5Q25GZDPY6WT3ANCNFSM4HTU3XKA">mute the thread</a>.<img src="https://github.com/notifications/beacon/ABE7WYA7FTWJB5RHPMJYTKDPY6WT3A5CNFSM4HTU3XKKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOB2UUASY.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/RIOT-OS/RIOT/pull/11634?email_source=notifications\u0026email_token=ABE7WYA6GFW6FNAZP25OUGDPY6WT3A5CNFSM4HTU3XKKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOB2UUASY#discussion_r290712584",
"url": "https://github.com/RIOT-OS/RIOT/pull/11634?email_source=notifications\u0026email_token=ABE7WYA6GFW6FNAZP25OUGDPY6WT3A5CNFSM4HTU3XKKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOB2UUASY#discussion_r290712584",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>