From 921b171acfcc7e55c1770bf095d9137e815199b5 Mon Sep 17 00:00:00 2001 From: Richard Sharpe Date: Thu, 24 Sep 1998 13:43:36 +0000 Subject: Added a minor fix to clitar.c for a bug. Could not check that it compiles clean with Jeremy's -Wflags because someone loaded some changes to reply.c that break in the locking area :-( (This used to be commit b18cd03c0bf3b7a6815d69a9bbeba7d1b076765c) --- source3/client/clitar.c | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) (limited to 'source3/client') diff --git a/source3/client/clitar.c b/source3/client/clitar.c index aadb485301..4d7a2cf043 100644 --- a/source3/client/clitar.c +++ b/source3/client/clitar.c @@ -307,12 +307,7 @@ static long readtarheader(union hblock *hb, file_info2 *finfo, char *prefix) if (fchk != chk) { DEBUG(0, ("checksums don't match %ld %ld\n", fchk, chk)); -/* for (i = 0; i < sizeof(hb -> dummy); i++) { - fprintf(stdout, "%2X ", hb -> dummy[i]); - } - fprintf(stdout, "\n"); - fprintf(stdout, "%s\n", hb -> dummy); - fprintf(stdout, "Tarbuf = %X, hb = %X\n", (int)tarbuf, (int)hb);*/ + dump_data(5, (char *)hb - TBLOCK, TBLOCK *3); return -1; } @@ -1683,7 +1678,7 @@ static int get_file(file_info2 finfo, char * inbuf, char * outbuf) /* First, skip any initial part of the part written that is left over */ /* from the end of the first TBLOCK */ - if ((bpos + dsize) >= TBLOCK) { + if ((bpos) && ((bpos + dsize) >= TBLOCK)) { dsize -= (TBLOCK - bpos); /* Get rid of the end of the first block */ bpos = 0; @@ -1709,15 +1704,6 @@ static int get_file(file_info2 finfo, char * inbuf, char * outbuf) } - /* if (dsize > 0) { - if (next_block(tarbuf, &buffer_p, tbufsiz) <=0) { - - DEBUG(0, ("Empty file, short tar file, or read error: %s\n", strerror(errno))); - return False; - - } - }*/ - bpos = dsize; } -- cgit