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
hiredis
Commits
2a7b8fac
Commit
2a7b8fac
authored
Apr 02, 2024
by
michael-grunder
Committed by
Michael Grunder
Apr 02, 2024
Browse files
Remove dead assignment in sdstrim.
The assignment is harmless but causes noise in static analysers
parent
7ab6b824
Changes
1
Show whitespace changes
Inline
Side-by-side
sds.c
View file @
2a7b8fac
...
@@ -692,10 +692,10 @@ fmt_error:
...
@@ -692,10 +692,10 @@ fmt_error:
* Output will be just "Hello World".
* Output will be just "Hello World".
*/
*/
sds sdstrim(sds s, const char *cset) {
sds sdstrim(sds s, const char *cset) {
char
*
start
,
*
end
,
*
sp
,
*
ep
;
char *end, *sp, *ep;
size_t len;
size_t len;
sp
=
start
=
s
;
sp = 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 > sp && strchr(cset, *ep)) ep--;
while(ep > sp && strchr(cset, *ep)) ep--;
...
...
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