summaryrefslogtreecommitdiff
path: root/lib/cbuf.h
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2018-01-05 01:58:08 +0100
committerRichard Braun <rbraun@sceen.net>2018-01-05 01:58:26 +0100
commit62d27d872769ebcd79a931fa07b1128576e65e65 (patch)
tree0a99e87809c9055dcdcfbd9ed4bec1a72534ced9 /lib/cbuf.h
parenta6c056ce150bd0339d5325edc18717b2d02a5b8d (diff)
error: remove and use standard errno codes instead
This change also adds strerror to string.h.
Diffstat (limited to 'lib/cbuf.h')
-rw-r--r--lib/cbuf.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/cbuf.h b/lib/cbuf.h
index eb2ec83..8b46cd4 100644
--- a/lib/cbuf.h
+++ b/lib/cbuf.h
@@ -96,7 +96,7 @@ void cbuf_init(struct cbuf *cbuf, void *buf, size_t capacity);
* Push data to a circular buffer.
*
* If the function isn't allowed to erase old data and the circular buffer
- * doesn't have enough unused bytes for the new data, ERROR_AGAIN is returned.
+ * doesn't have enough unused bytes for the new data, EAGAIN is returned.
*/
int cbuf_push(struct cbuf *cbuf, const void *buf, size_t size, bool erase);
@@ -106,7 +106,7 @@ int cbuf_push(struct cbuf *cbuf, const void *buf, size_t size, bool erase);
* On entry, the sizep argument points to the size of the output buffer.
* On exit, it is updated to the number of bytes actually transferred.
*
- * If the buffer is empty, ERROR_AGAIN is returned, and the size of the
+ * If the buffer is empty, EAGAIN is returned, and the size of the
* output buffer is undefined.
*/
int cbuf_pop(struct cbuf *cbuf, void *buf, size_t *sizep);
@@ -115,21 +115,21 @@ int cbuf_pop(struct cbuf *cbuf, void *buf, size_t *sizep);
* Push a byte to a circular buffer.
*
* If the function isn't allowed to erase old data and the circular buffer
- * is full, ERROR_AGAIN is returned.
+ * is full, EAGAIN is returned.
*/
int cbuf_pushb(struct cbuf *cbuf, uint8_t byte, bool erase);
/*
* Pop a byte from a circular buffer.
*
- * If the buffer is empty, ERROR_AGAIN is returned.
+ * If the buffer is empty, EAGAIN is returned.
*/
int cbuf_popb(struct cbuf *cbuf, void *bytep);
/*
* Write into a circular buffer at a specific location.
*
- * If the given index is outside buffer boundaries, ERROR_INVAL is returned.
+ * If the given index is outside buffer boundaries, EINVAL is returned.
* The given [index, size) range may extend beyond the end of the circular
* buffer.
*/
@@ -141,7 +141,7 @@ int cbuf_write(struct cbuf *cbuf, size_t index, const void *buf, size_t size);
* On entry, the sizep argument points to the size of the output buffer.
* On exit, it is updated to the number of bytes actually transferred.
*
- * If the given index is outside buffer boundaries, ERROR_INVAL is returned.
+ * If the given index is outside buffer boundaries, EINVAL is returned.
*
* The circular buffer isn't changed by this operation.
*/