clean dead assignment, start is never used in sdstrim function (#8796)

This commit is contained in:
Bonsai 2021-04-20 12:37:37 +08:00 committed by GitHub
parent 61d3fdb474
commit c2aff4c744
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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--;