]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Value stored to 'i' is never read.
authorMichihiro NAKAJIMA <ggcueroad@gmail.com>
Mon, 9 Nov 2009 08:03:27 +0000 (03:03 -0500)
committerMichihiro NAKAJIMA <ggcueroad@gmail.com>
Mon, 9 Nov 2009 08:03:27 +0000 (03:03 -0500)
Found by Clang Static Analyzer.

SVN-Revision: 1625

tar/util.c

index 2b0751aea0f8822f44c9f1a7d5f655c799b1ddc9..9cf344a18a80ed806e8df5a1bcd0ee88193d80e3 100644 (file)
@@ -158,12 +158,12 @@ safe_fprintf(FILE *f, const char *fmt, ...)
 
                /* If our output buffer is full, dump it and keep going. */
                if (i > (sizeof(outbuff) - 20)) {
-                       outbuff[i++] = '\0';
+                       outbuff[i] = '\0';
                        fprintf(f, "%s", outbuff);
                        i = 0;
                }
        }
-       outbuff[i++] = '\0';
+       outbuff[i] = '\0';
        fprintf(f, "%s", outbuff);
 
        /* If we allocated a heap-based formatting buffer, free it now. */