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
37b135a4
Commit
37b135a4
authored
Apr 16, 2020
by
antirez
Browse files
Update SDS to latest version.
parent
c9388ecc
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/sds.c
View file @
37b135a4
...
@@ -97,11 +97,11 @@ sds sdsnewlen(const void *init, size_t initlen) {
...
@@ -97,11 +97,11 @@ sds sdsnewlen(const void *init, size_t initlen) {
unsigned
char
*
fp
;
/* flags pointer. */
unsigned
char
*
fp
;
/* flags pointer. */
sh
=
s_malloc
(
hdrlen
+
initlen
+
1
);
sh
=
s_malloc
(
hdrlen
+
initlen
+
1
);
if
(
sh
==
NULL
)
return
NULL
;
if
(
init
==
SDS_NOINIT
)
if
(
init
==
SDS_NOINIT
)
init
=
NULL
;
init
=
NULL
;
else
if
(
!
init
)
else
if
(
!
init
)
memset
(
sh
,
0
,
hdrlen
+
initlen
+
1
);
memset
(
sh
,
0
,
hdrlen
+
initlen
+
1
);
if
(
sh
==
NULL
)
return
NULL
;
s
=
(
char
*
)
sh
+
hdrlen
;
s
=
(
char
*
)
sh
+
hdrlen
;
fp
=
((
unsigned
char
*
)
s
)
-
1
;
fp
=
((
unsigned
char
*
)
s
)
-
1
;
switch
(
type
)
{
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