make cxBufferEof() return a bool

2 weeks ago

author
Mike Becker <universe@uap-core.de>
date
Mon, 09 Dec 2024 23:31:42 +0100 (2 weeks ago)
changeset 1004
d8044fd5005c
parent 1003
455afb252878
child 1005
67fa386ce600

make cxBufferEof() return a bool

src/buffer.c file | annotate | diff | comparison | revisions
src/cx/buffer.h file | annotate | diff | comparison | revisions
--- a/src/buffer.c	Sun Dec 08 00:18:47 2024 +0100
+++ b/src/buffer.c	Mon Dec 09 23:31:42 2024 +0100
@@ -143,7 +143,7 @@
     buffer->pos = 0;
 }
 
-int cxBufferEof(const CxBuffer *buffer) {
+bool cxBufferEof(const CxBuffer *buffer) {
     return buffer->pos >= buffer->size;
 }
 
--- a/src/cx/buffer.h	Sun Dec 08 00:18:47 2024 +0100
+++ b/src/cx/buffer.h	Mon Dec 09 23:31:42 2024 +0100
@@ -344,12 +344,12 @@
  * Tests, if the buffer position has exceeded the buffer size.
  *
  * @param buffer the buffer to test
- * @return non-zero, if the current buffer position has exceeded the last
+ * @return true, if the current buffer position has exceeded the last
  * byte of the buffer's contents.
  */
 cx_attr_nonnull
 cx_attr_nodiscard
-int cxBufferEof(const CxBuffer *buffer);
+bool cxBufferEof(const CxBuffer *buffer);
 
 
 /**

mercurial