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
0b7f5e25
Commit
0b7f5e25
authored
Dec 10, 2014
by
antirez
Browse files
Merge branch 'unstable' of github.com:/antirez/redis into unstable
parents
0195afae
6a378dc3
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/sds.c
View file @
0b7f5e25
...
@@ -570,7 +570,7 @@ sds sdstrim(sds s, const char *cset) {
...
@@ -570,7 +570,7 @@ sds sdstrim(sds s, const char *cset) {
sp
=
start
=
s
;
sp
=
start
=
s
;
ep
=
end
=
s
+
sdslen
(
s
)
-
1
;
ep
=
end
=
s
+
sdslen
(
s
)
-
1
;
while
(
sp
<=
end
&&
strchr
(
cset
,
*
sp
))
sp
++
;
while
(
sp
<=
end
&&
strchr
(
cset
,
*
sp
))
sp
++
;
while
(
ep
>
s
tart
&&
strchr
(
cset
,
*
ep
))
ep
--
;
while
(
ep
>
s
p
&&
strchr
(
cset
,
*
ep
))
ep
--
;
len
=
(
sp
>
ep
)
?
0
:
((
ep
-
sp
)
+
1
);
len
=
(
sp
>
ep
)
?
0
:
((
ep
-
sp
)
+
1
);
if
(
sh
->
buf
!=
sp
)
memmove
(
sh
->
buf
,
sp
,
len
);
if
(
sh
->
buf
!=
sp
)
memmove
(
sh
->
buf
,
sp
,
len
);
sh
->
buf
[
len
]
=
'\0'
;
sh
->
buf
[
len
]
=
'\0'
;
...
...
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