summaryrefslogtreecommitdiff
path: root/src/sds.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sds.c')
-rw-r--r--src/sds.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/sds.c b/src/sds.c
index e3dd67352..26e90a6db 100644
--- a/src/sds.c
+++ b/src/sds.c
@@ -55,13 +55,13 @@ static inline int sdsHdrSize(char type) {
}
static inline char sdsReqType(size_t string_size) {
- if (string_size < 32)
+ if (string_size < 1<<5)
return SDS_TYPE_5;
- if (string_size < 0xff)
+ if (string_size < 1<<8)
return SDS_TYPE_8;
- if (string_size < 0xffff)
+ if (string_size < 1<<16)
return SDS_TYPE_16;
- if (string_size < 0xffffffff)
+ if (string_size < 1ll<<32)
return SDS_TYPE_32;
return SDS_TYPE_64;
}