From 1d79373523915b77cdf3f845ac415feab4949fca Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sat, 6 Jul 2013 21:31:11 +0200 Subject: [PATCH 1/1] command.c: Remove pointless initialization. Found by the clang analyzer: command.c:934:16: warning: Assigned value is always the same as the existing value for (i = 0, p = iov->iov_base; p < end; i++) ~ ^ ~~~~~~~~~~~~~ clang is right: A couple of lines before the for loop we set p to iov->iov_base and do not modify it. --- command.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command.c b/command.c index 4bbf494c..33cc4b2f 100644 --- a/command.c +++ b/command.c @@ -842,7 +842,7 @@ static int parse_sb_command(struct command_context *cc, struct iovec *iov) if (ret < 0) goto out; end = iov->iov_base + iov->iov_len; - for (i = 0, p = iov->iov_base; p < end; i++) + for (i = 0; p < end; i++) p += strlen(p) + 1; cc->argc = i; cc->argv = para_malloc((cc->argc + 1) * sizeof(char *)); -- 2.39.2