Remove dead assignment in sdstrim.
The assignment is harmless but causes noise in static analysers
This commit is contained in:
parent
7ab6b824c7
commit
2a7b8fac96
4
sds.c
4
sds.c
@ -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--;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user