Commit Graph

6 Commits

Author SHA1 Message Date
Justin Brewer
58e6b87f51 Remove redundant NULL checks
free(NULL) is a valid NOP. Most of the hiredis free functions behave the
same way. redisReaderFree is updated to also be NULL-safe.

There is one redundant NULL check at sds.c:1036, but it's left as is
since sds is imported from upstream.

Signed-off-by: Justin Brewer <jzb0012@auburn.edu>
2018-04-30 21:45:13 -05:00
Justin Brewer
54acc8f087 Remove redundant zero stores
calloc is guaranteed to provide a zero-initialized buffer. There is
no need to set fields to zero explicitly.

Signed-off-by: Justin Brewer <jzb0012@auburn.edu>
2018-04-30 21:45:13 -05:00
cdliuqiang@gmail.com
9219556386 calloc param fixes and NULL check 2018-01-05 16:19:54 +01:00
DongwenHuang
6bfc580a34 Update read.c
static char *seekNewline(char *s, size_t len)  : 
this function can not parse the string,such as "hello world\r". the case that  the last char is '\r'.
2016-04-11 23:27:45 +08:00
tzickel
ec229678c2 Added support for compiling the parser code with Microsoft Visual C compiler.
For hiredis-py and others support on windows.
2015-03-13 15:58:23 +02:00
tzickel
ba3e74c408 Refactor reading code into read.c
Makes hiredis reading functions easier to include in external projects

[fixed all merge conflicts against current version]

Closes #249
2015-01-05 16:53:22 -05:00