Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
9f76d826
Commit
9f76d826
authored
Sep 01, 2016
by
antirez
Browse files
sds: don't check for impossible string size in 32 bit systems.
parent
e0d41466
Changes
1
Show whitespace changes
Inline
Side-by-side
src/sds.c
View file @
9f76d826
...
...
@@ -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
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment