From 2f1196a64aad29784c59ba8eb8384dc16d6ceb8d Mon Sep 17 00:00:00 2001 From: bde Date: Mon, 18 Sep 1995 18:37:09 +0000 Subject: [PATCH] Back out the change in rev.1.4 and fix the formatting of the change in rev.1.3. 1.4 just broke 1.3 for the -x case. This fixes PR 721 and merges archive.c with 4.4Lite2. --- usr.bin/ar/archive.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/usr.bin/ar/archive.c b/usr.bin/ar/archive.c index ddd9f8648215..021e13131adf 100644 --- a/usr.bin/ar/archive.c +++ b/usr.bin/ar/archive.c @@ -276,7 +276,6 @@ copy_ar(cfp, size) CF *cfp; off_t size; { - int pad_odd_read; static char pad = '\n'; off_t sz; int from, nr, nw, off, to; @@ -300,12 +299,8 @@ copy_ar(cfp, size) error(cfp->rname); } - if (already_written) - pad_odd_read = (cfp->flags & RPAD) && ((size + chdr.lname) & 1); - else - pad_odd_read = (cfp->flags & RPAD) && (size & 1); - - if (pad_odd_read && (nr = read(from, buf, 1)) != 1) { + if (cfp->flags & RPAD && (size + chdr.lname) & 1 && + (nr = read(from, buf, 1)) != 1) { if (nr == 0) badfmt(); error(cfp->rname);