]> git.tuebingen.mpg.de Git - dss.git/commitdiff
str.c: Remove pointless initialization.
authorAndre Noll <maan@tuebingen.mpg.de>
Sat, 3 Jan 2015 16:08:00 +0000 (16:08 +0000)
committerAndre Noll <maan@tuebingen.mpg.de>
Tue, 6 Jan 2015 19:55:32 +0000 (20:55 +0100)
The variable p is initialized to a different value a few lines later
and the value set in the definition is not used in between.

Found by cppcheck.

str.c

diff --git a/str.c b/str.c
index d6c768d0bc90e3a0873f1aca8312512c9195bd91..df706ef497dd04234a050ce5a1ecb2f0dee77175 100644 (file)
--- a/str.c
+++ b/str.c
@@ -242,7 +242,7 @@ __must_check __malloc char *dss_logname(void)
  */
 unsigned split_args(char *args, char *** const argv_ptr, const char *delim)
 {
-       char *p = args;
+       char *p;
        char **argv;
        size_t n = 0, i, j;