Merge pull request #5127 from oranagra/sds_req_type

bugfix in sdsReqType creating 64bit sds headers on 32bit systems
This commit is contained in:
Salvatore Sanfilippo 2018-07-16 18:32:14 +02:00 committed by GitHub
commit cab396761e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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