[riot-notifications] [RIOT-OS/RIOT] tsrb: change input type to `uint8_t` (#11634)

Martine Lenders notifications at github.com
Wed Jun 5 13:27:18 CEST 2019


miri64 commented on this pull request.



>  {
     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)

Also it's the same reason, why I disagree with a return pointer: it makes the function less efficient, especially when implementing such central functions like `getchar()`.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/11634#discussion_r290692267
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190605/54fd51e2/attachment.html>


More information about the notifications mailing list