commit d56201dc268d3c6686e271369f8dafc9e9df8e2b
parent e0839c63be64338a455537b218246164b7810840
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Mon, 19 Feb 2018 21:14:11 +0000
[ar] Remove iflag
It is totally equivalent to bflag, so we can use only one of them.
Diffstat:
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/ar/main.c b/ar/main.c
@@ -15,7 +15,7 @@ static char sccsid[] = "@(#) ./ar/main.c";
char *argv0;
-static int bflag, iflag, vflag, cflag, lflag, uflag, aflag, haslist;
+static int bflag, vflag, cflag, lflag, uflag, aflag, haslist;
static char *posname, *tmpafile1, *tmpafile2;
struct arop {
@@ -238,7 +238,7 @@ merge(struct arop *op, char *list[])
while ((c = getc(op->tmp)) != EOF)
putc(c, op->dst);
- if (bflag || iflag)
+ if (bflag)
copy(&op->hdr, op->size, op->src, op->dst);
}
@@ -256,7 +256,7 @@ insert(struct arop *op, char *list[])
for ( ; *list; ++list)
archive(*list, op->dst, 'a');
- if (bflag || iflag)
+ if (bflag)
copy(&op->hdr, op->size, op->src, op->dst);
}
@@ -618,16 +618,12 @@ main(int argc, char *argv[])
pos++;
posname = EARGF(usage());
break;
+ case 'i':
case 'b':
bflag = 1;
pos++;
posname = EARGF(usage());
break;
- case 'i':
- iflag = 1;
- pos++;
- posname = EARGF(usage());
- break;
case 'v':
vflag = 1;
break;