diff --git a/src/sds.c b/src/sds.c index 2ec3aa733..1a590c84b 100644 --- a/src/sds.c +++ b/src/sds.c @@ -745,10 +745,10 @@ sds sdscatfmt(sds s, char const *fmt, ...) { * Output will be just "HelloWorld". */ 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--;