[riot-notifications] [RIOT-OS/RIOT] tsrb: change input type to `uint8_t` (#11634)
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:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the notifications