summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPieter Noordhuis <pcnoordhuis@gmail.com>2010-11-04 20:55:03 +0100
committerPieter Noordhuis <pcnoordhuis@gmail.com>2010-11-04 20:55:03 +0100
commit8b616d3547dc8ba64182bf0fa1210de13e675a22 (patch)
treefccc90eb70df86c43b43ed9c1da0742f64a6e5cf
parent183220bf6002d904813468e7396d36267b1496e3 (diff)
The buffer length to feed should be a size_t
-rw-r--r--hiredis.c2
-rw-r--r--hiredis.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/hiredis.c b/hiredis.c
index 66789d0..ffdf027 100644
--- a/hiredis.c
+++ b/hiredis.c
@@ -424,7 +424,7 @@ char *redisReplyReaderGetError(void *reader) {
return r->error;
}
-void redisReplyReaderFeed(void *reader, char *buf, int len) {
+void redisReplyReaderFeed(void *reader, char *buf, size_t len) {
redisReader *r = reader;
/* Copy the provided buffer. */
diff --git a/hiredis.h b/hiredis.h
index 0a6a9a1..cb25b36 100644
--- a/hiredis.h
+++ b/hiredis.h
@@ -115,7 +115,7 @@ int redisReplyReaderSetReplyObjectFunctions(void *reader, redisReplyObjectFuncti
void *redisReplyReaderGetObject(void *reader);
char *redisReplyReaderGetError(void *reader);
void redisReplyReaderFree(void *ptr);
-void redisReplyReaderFeed(void *reader, char *buf, int len);
+void redisReplyReaderFeed(void *reader, char *buf, size_t len);
int redisReplyReaderGetReply(void *reader, void **reply);
/* Functions to format a command according to the protocol. */