scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | Submodules | README | LICENSE

commit 65120a98fb3d4d914f79cc66dc425d7d4d81c666
parent 0e3916924910843d4edb4fa7795e8b9476ed9e54
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Sun, 10 Feb 2019 21:43:51 +0000

[ar] Remove unneded variable

Diffstat:
Msrc/cmd/ar.c | 6+++---
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());