Compare commits

...

1 Commits

Author SHA1 Message Date
michael-grunder
6b778f732e Remove dead assignment in sdstrim.
The assignment is harmless but causes noise in static analysers
2024-04-02 14:11:16 -07:00

4
sds.c
View File

@ -692,10 +692,10 @@ fmt_error:
* Output will be just "Hello World".
*/
sds sdstrim(sds s, const char *cset) {
char *start, *end, *sp, *ep;
char *end, *sp, *ep;
size_t len;
sp = start = s;
sp = s;
ep = end = s+sdslen(s)-1;
while(sp <= end && strchr(cset, *sp)) sp++;
while(ep > sp && strchr(cset, *ep)) ep--;