|
|
|
@ -139,7 +139,7 @@ bool cbuf_peek(const CircBuf *cb, void *dest) |
|
|
|
|
|
|
|
|
|
void * cbuf_ptr(const CircBuf *cb) |
|
|
|
|
{ |
|
|
|
|
if (cb == NULL || dest == NULL || cb->num_used == 0) { |
|
|
|
|
if (cb == NULL || cb->num_used == 0) { |
|
|
|
|
return NULL; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -163,7 +163,7 @@ bool cbuf_nth(const CircBuf *cb, circbuf_size_t num, void *dest) |
|
|
|
|
|
|
|
|
|
void *cbuf_ptr_nth(const CircBuf *cb, circbuf_size_t num) |
|
|
|
|
{ |
|
|
|
|
if (cb == NULL || dest == NULL || num > cb->num_used) { |
|
|
|
|
if (cb == NULL || num > cb->num_used) { |
|
|
|
|
return NULL; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -231,7 +231,7 @@ bool cbuf_peek_back(const CircBuf *cb, void *dest) |
|
|
|
|
|
|
|
|
|
void* cbuf_ptr_back(const CircBuf *cb) |
|
|
|
|
{ |
|
|
|
|
if (cb == NULL || dest == NULL || cb->num_used == 0) { |
|
|
|
|
if (cb == NULL || cb->num_used == 0) { |
|
|
|
|
return NULL; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|