summaryrefslogtreecommitdiff
path: root/src/buffer.c
diff options
context:
space:
mode:
authorVicent Marti <tanoku@gmail.com>2014-09-02 13:37:34 +0200
committerVicent Marti <tanoku@gmail.com>2014-09-09 03:39:15 +0200
commitc28af79329264a7cf331a1b1c414919e4ed9e9f9 (patch)
tree086b28822b457bde4c525f4b86a42618c030dfc6 /src/buffer.c
parent24248c0f1a6de6f229890c5c03aeff8738214fee (diff)
It buiiiilds
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 17dc864..cfc6a7e 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -245,11 +245,11 @@ int gh_buf_cmp(const gh_buf *a, const gh_buf *b)
int gh_buf_strchr(const gh_buf *buf, int c, int pos)
{
- const char *p = memchr(buf->ptr + pos, c, buf->size - pos);
+ const unsigned char *p = memchr(buf->ptr + pos, c, buf->size - pos);
if (!p)
return -1;
- return (int)(p - buf->ptr);
+ return (int)(p - (const unsigned char *)buf->ptr);
}
int gh_buf_strrchr(const gh_buf *buf, int c, int pos)
@@ -264,7 +264,7 @@ int gh_buf_strrchr(const gh_buf *buf, int c, int pos)
return -1;
}
-void gh_buf_truncate(gh_buf *buf, size_t len)
+void gh_buf_truncate(gh_buf *buf, int len)
{
if (len < buf->size) {
buf->size = len;