Skip to content

Commit

Permalink
Remove dead assignment in sdstrim.
Browse files Browse the repository at this point in the history
The assignment is harmless but causes noise in static analysers
  • Loading branch information
michael-grunder committed Apr 2, 2024
1 parent 7ab6b82 commit 2a7b8fa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sds.c
Original file line number Diff line number Diff line change
Expand Up @@ -692,10 +692,10 @@ sds sdscatfmt(sds s, char const *fmt, ...) {
* 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--;
Expand Down

0 comments on commit 2a7b8fa

Please sign in to comment.