Commit 9f76d826 authored by antirez's avatar antirez
Browse files

sds: don't check for impossible string size in 32 bit systems.

parent e0d41466
......@@ -35,6 +35,7 @@
#include <string.h>
#include <ctype.h>
#include <assert.h>
#include <limits.h>
#include "sds.h"
#include "sdsalloc.h"
......@@ -61,8 +62,10 @@ static inline char sdsReqType(size_t string_size) {
return SDS_TYPE_8;
if (string_size < 1<<16)
return SDS_TYPE_16;
#if (LONG_MAX == LLONG_MAX)
if (string_size < 1ll<<32)
return SDS_TYPE_32;
#endif
return SDS_TYPE_64;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment