diff options
Diffstat (limited to 'src/sds.c')
-rw-r--r-- | src/sds.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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; } |