summaryrefslogtreecommitdiffstats
path: root/usr.bin/ar
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1995-09-18 18:37:09 +0000
committerbde <bde@FreeBSD.org>1995-09-18 18:37:09 +0000
commit2f1196a64aad29784c59ba8eb8384dc16d6ceb8d (patch)
treef9eab6c51186b05a0604dea0f92c956e1bc3fadb /usr.bin/ar
parent89e0ab3dba9ef542f52287fd1820072c4de7d393 (diff)
downloadFreeBSD-src-2f1196a64aad29784c59ba8eb8384dc16d6ceb8d.zip
FreeBSD-src-2f1196a64aad29784c59ba8eb8384dc16d6ceb8d.tar.gz
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.
Diffstat (limited to 'usr.bin/ar')
-rw-r--r--usr.bin/ar/archive.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/usr.bin/ar/archive.c b/usr.bin/ar/archive.c
index ddd9f86..021e131 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);
OpenPOWER on IntegriCloud