summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSalvatore Sanfilippo <antirez@gmail.com>2018-07-16 18:32:14 +0200
committerGitHub <noreply@github.com>2018-07-16 18:32:14 +0200
commitcab396761e6d7dbec99627ac4fa1c441027d56d3 (patch)
tree8a0d23b00ae8f22fd84a0fd54a6fd93c34a2e9b0
parentf9c84d6d39411d25bb29d3a03b29ec257e2b66e7 (diff)
parentb05a22e261bf2ed278d6b1a6afb3ade7ff4cacfc (diff)
downloadredis-cab396761e6d7dbec99627ac4fa1c441027d56d3.tar.gz
Merge pull request #5127 from oranagra/sds_req_type
bugfix in sdsReqType creating 64bit sds headers on 32bit systems
-rw-r--r--src/sds.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/sds.c b/src/sds.c
index c4f43603d..39ad595ed 100644
--- a/src/sds.c
+++ b/src/sds.c
@@ -67,8 +67,10 @@ static inline char sdsReqType(size_t string_size) {
#if (LONG_MAX == LLONG_MAX)
if (string_size < 1ll<<32)
return SDS_TYPE_32;
-#endif
return SDS_TYPE_64;
+#else
+ return SDS_TYPE_32;
+#endif
}
/* Create a new sds string with the content specified by the 'init' pointer