summaryrefslogtreecommitdiff
path: root/src/libstddjb/cbuffer_wpeek.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2017-07-31 12:21:48 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2017-07-31 12:21:48 +0000
commita28a432f7823cf2173d6f1e54c99438503d3174f (patch)
treec278f7343cd2cd40f3071a25c10c5da01484a0bc /src/libstddjb/cbuffer_wpeek.c
parent3c5f5aea891c85dbdfc4d287d7ebf2bb813d6405 (diff)
downloadskalibs-a28a432f7823cf2173d6f1e54c99438503d3174f.tar.xz
Make cbuffer_?peek take a const; make *_init not leak when misused
Diffstat (limited to 'src/libstddjb/cbuffer_wpeek.c')
-rw-r--r--src/libstddjb/cbuffer_wpeek.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstddjb/cbuffer_wpeek.c b/src/libstddjb/cbuffer_wpeek.c
index 8b6b586..d023294 100644
--- a/src/libstddjb/cbuffer_wpeek.c
+++ b/src/libstddjb/cbuffer_wpeek.c
@@ -3,7 +3,7 @@
#include <sys/uio.h>
#include <skalibs/cbuffer.h>
-void cbuffer_wpeek (cbuffer_t *b, struct iovec *v)
+void cbuffer_wpeek (cbuffer_t const *b, struct iovec *v)
{
size_t last = (b->a - 1 + b->p) % b->a ;
v[0].iov_base = b->x + b->n ;