summaryrefslogtreecommitdiff
path: root/zlib/inflate.c
diff options
context:
space:
mode:
authorjbj <devnull@localhost>2001-11-21 20:47:36 +0000
committerjbj <devnull@localhost>2001-11-21 20:47:36 +0000
commitb20a562f23b0969b6c7e7679a6c82fc801fbbd22 (patch)
tree00cd5ba14739f5972c9508a4ed0d9cb9e8e25606 /zlib/inflate.c
parenta758bedad830501ddc8d7c277f6f92645c1a7e18 (diff)
downloadlibrpm-tizen-b20a562f23b0969b6c7e7679a6c82fc801fbbd22.tar.gz
librpm-tizen-b20a562f23b0969b6c7e7679a6c82fc801fbbd22.tar.bz2
librpm-tizen-b20a562f23b0969b6c7e7679a6c82fc801fbbd22.zip
Apply speedup patch from Ben LaHaise <bcrl@redhat.com> from
http://touchme.toronto.redhat.com/~bcrl/zlib-x86-opt-20010103C.diff CVS patchset: 5202 CVS date: 2001/11/21 20:47:36
Diffstat (limited to 'zlib/inflate.c')
-rw-r--r--zlib/inflate.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/zlib/inflate.c b/zlib/inflate.c
index 32e9b8de6..f177186dd 100644
--- a/zlib/inflate.c
+++ b/zlib/inflate.c
@@ -144,8 +144,8 @@ int stream_size;
}
-#define NEEDBYTE {if(z->avail_in==0)return r;r=f;}
-#define NEXTBYTE (z->avail_in--,z->total_in++,*z->next_in++)
+#define NEEDBYTE {if(z->avail_in==0)goto out_NEEDBYTE;r=f;}
+#define NEXTBYTE (z->avail_in--,/*z->total_in++,*/ *z->next_in++)
int ZEXPORT inflate(z, f)
z_streamp z;
@@ -153,9 +153,10 @@ int f;
{
int r;
uInt b;
-
+#if 0
if (z == Z_NULL || z->state == Z_NULL || z->next_in == Z_NULL)
return Z_STREAM_ERROR;
+#endif
f = f == Z_FINISH ? Z_BUF_ERROR : Z_OK;
r = Z_BUF_ERROR;
while (1) switch (z->state->mode)
@@ -272,6 +273,9 @@ int f;
#ifdef NEED_DUMMY_RETURN
return Z_STREAM_ERROR; /* Some dumb compilers complain without this */
#endif
+
+out_NEEDBYTE:
+ return r;
}