From a1bc89b23621df61437619eec849a6a8bcc30a03 Mon Sep 17 00:00:00 2001 From: jinguoli Date: Mon, 3 Nov 2014 12:45:42 +0800 Subject: [PATCH] Improve calloc() correctness [It doesn't _actually_ matter, but technically the order argument is: (number of items, size of items)] Closes #279 --- hiredis.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hiredis.c b/hiredis.c index c6d1dd8..4dfd863 100644 --- a/hiredis.c +++ b/hiredis.c @@ -559,7 +559,7 @@ static int processItem(redisReader *r) { redisReader *redisReaderCreate(void) { redisReader *r; - r = calloc(sizeof(redisReader),1); + r = calloc(1,sizeof(redisReader)); if (r == NULL) return NULL;