Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
9f594e24
Commit
9f594e24
authored
Apr 16, 2020
by
antirez
Browse files
Update SDS to latest version.
parent
48781dd9
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/sds.c
View file @
9f594e24
...
...
@@ -97,11 +97,11 @@ sds sdsnewlen(const void *init, size_t initlen) {
unsigned
char
*
fp
;
/* flags pointer. */
sh
=
s_malloc
(
hdrlen
+
initlen
+
1
);
if
(
sh
==
NULL
)
return
NULL
;
if
(
init
==
SDS_NOINIT
)
init
=
NULL
;
else
if
(
!
init
)
memset
(
sh
,
0
,
hdrlen
+
initlen
+
1
);
if
(
sh
==
NULL
)
return
NULL
;
s
=
(
char
*
)
sh
+
hdrlen
;
fp
=
((
unsigned
char
*
)
s
)
-
1
;
switch
(
type
)
{
...
...
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