diff --git a/src/util.c b/src/util.c index 4b1aaaba7..295f32642 100644 --- a/src/util.c +++ b/src/util.c @@ -256,7 +256,7 @@ uint32_t sdigits10(int64_t v) { if (v < 0) { /* Abs value of LLONG_MIN requires special handling. */ uint64_t uv = (v != LLONG_MIN) ? - -v : ((uint64_t) LLONG_MAX)+1; + (uint64_t)-v : ((uint64_t) LLONG_MAX)+1; return digits10(uv)+1; /* +1 for the minus. */ } else { return digits10(v); diff --git a/src/util.h b/src/util.h index 544b9b8bd..c27f7017b 100644 --- a/src/util.h +++ b/src/util.h @@ -30,6 +30,7 @@ #ifndef __REDIS_UTIL_H #define __REDIS_UTIL_H +#include #include "sds.h" int stringmatchlen(const char *p, int plen, const char *s, int slen, int nocase);