Skip to content

Commit 080a71c

Browse files
committed
f-turb
1 parent 1b7eeaa commit 080a71c

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

sys/include/turb.h

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
* @brief Thread-unsafe ringbuffer interface definition
2020
*
2121
* @author Kaspar Schleiser <[email protected]>
22+
* @author Karl Fessel <[email protected]>
2223
*/
2324

2425
#include "tsrb.h"
@@ -147,12 +148,12 @@ static inline int turb_peek_one(tsrb_t *rb)
147148
*/
148149
static inline int turb_get(tsrb_t *rb, uint8_t *dst, size_t n)
149150
{
150-
size_t ret = 0;
151+
size_t cnt = 0;
151152
while (n-- && !turb_empty(rb)) {
152153
*dst++ = _turb_pop(rb);
153-
ret++;
154+
cnt++;
154155
}
155-
return (int) ret;
156+
return (int) cnt;
156157
}
157158

158159
/**
@@ -182,12 +183,12 @@ static inline int turb_peek(tsrb_t *rb, uint8_t *dst, size_t n)
182183
*/
183184
static inline int turb_drop(tsrb_t *rb, size_t n)
184185
{
185-
size_t ret = 0;
186+
size_t cnt = 0;
186187
while (n-- && !turb_empty(rb)) {
187188
_turb_pop(rb);
188-
ret++;
189+
cnt++;
189190
}
190-
return (int) ret;
191+
return (int) cnt;
191192
}
192193

193194
/**

0 commit comments

Comments
 (0)