From c2aff4c74493b921b1ad6868902ba68d647cc1c8 Mon Sep 17 00:00:00 2001 From: Bonsai Date: Tue, 20 Apr 2021 12:37:37 +0800 Subject: [PATCH] clean dead assignment, start is never used in sdstrim function (#8796) --- src/sds.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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--;