X-Git-Url: https://git.wh0rd.org/?p=dump.git;a=blobdiff_plain;f=restore%2Ftape.c;h=68a40a0556cd56f85e249d85fb2e82f8fdce0e98;hp=560a6c96c5f220d00e04eaefc427a1011a7106d4;hb=814574507fef62cfe83f6d1c579aa4b6736443a2;hpb=28ba5caee0ed25d3b38da769967173e5710bc10c diff --git a/restore/tape.c b/restore/tape.c index 560a6c9..68a40a0 100644 --- a/restore/tape.c +++ b/restore/tape.c @@ -42,7 +42,7 @@ #ifndef lint static const char rcsid[] = - "$Id: tape.c,v 1.79 2004/04/13 13:04:33 stelian Exp $"; + "$Id: tape.c,v 1.80 2004/04/21 09:15:22 stelian Exp $"; #endif /* not lint */ #include @@ -2063,9 +2063,6 @@ decompress_tapebuf(struct tapebuf *tpbin, int readsize) /* zflag gets set in setup() from the dump header */ int cresult, blocklen; unsigned long worklen; -#ifdef HAVE_BZLIB - unsigned int worklen2; -#endif char *output = NULL,*reason = NULL, *lengtherr = NULL; /* build a length error message */ @@ -2112,7 +2109,7 @@ decompress_tapebuf(struct tapebuf *tpbin, int readsize) #ifndef HAVE_BZLIB errx(1,"This restore version doesn't support bzlib decompression"); #else - worklen2 = worklen; + unsigned int worklen2 = worklen; cresult = BZ2_bzBuffToBuffDecompress( comprbuf, &worklen2, tpbin->buf, blocklen, 0, 0); @@ -2145,8 +2142,10 @@ decompress_tapebuf(struct tapebuf *tpbin, int readsize) #ifndef HAVE_LZO errx(1,"This restore version doesn't support lzo decompression"); #else + lzo_uint worklen2 = worklen; cresult = lzo1x_decompress(tpbin->buf, blocklen, - comprbuf, (lzo_uintp) &worklen,NULL); + comprbuf, &worklen2, NULL); + worklen = worklen2; output = comprbuf; switch (cresult) { case LZO_E_OK: