commit 01b0ce2d6c500d17a7cffe10864a82842df5fbde
parent c503e20b9b2cdf0829b73809876b7af7770821df
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Sun, 10 Feb 2019 21:43:51 +0000
[ar] Remove unneded variable
Diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/cmd/ar.c b/src/cmd/ar.c
@@ -110,7 +110,6 @@ static void
archive(char *pname, FILE *to, char letter)
{
int c;
- size_t n;
FILE *from;
char mtime[13], *fname;
struct fprop prop;
@@ -133,9 +132,10 @@ archive(char *pname, FILE *to, char letter)
prop.gid,
prop.mode,
prop.size);
- for (n = 0; (c = getc(from)) != EOF; n++)
+
+ while ((c = getc(from)) != EOF)
putc(c, to);
- if (n & 1)
+ if (prop.size & 1)
putc('\n', to);
if (ferror(from))
error("reading input '%s': %s", pname, errstr());