summaryrefslogtreecommitdiff
path: root/inflate.c
diff options
context:
space:
mode:
authorMika Lindqvist <postmaster@raasu.org>2017-05-03 20:14:57 +0300
committerHans Kristian Rosbach <hk-github@circlestorm.org>2017-05-03 19:14:57 +0200
commit5adc2052ebdd2578fde4ee3ebc500d71e967b8ae (patch)
treeaee917ad21a950e5f1d8616446d38682b55100de /inflate.c
parenta7c7119009a65f2bf554faab19583650bf5fa0f7 (diff)
Lazily initialize functable members. (#108)
- Split functableInit() function as separate functions for each functable member, so we don't need to initialize full functable in multiple places in the zlib-ng code, or to check for NULL on every invocation. - Optimized function for each functable member is detected on first invocation and the functable item is updated for subsequent invocations. - Remove NULL check in adler32() and adler32_z() as it is no longer needed.
Diffstat (limited to 'inflate.c')
-rw-r--r--inflate.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/inflate.c b/inflate.c
index 68a41ac..1b5a554 100644
--- a/inflate.c
+++ b/inflate.c
@@ -187,8 +187,6 @@ int ZEXPORT inflateInit2_(z_stream *strm, int windowBits, const char *version, i
int ret;
struct inflate_state *state;
- functableInit();
-
if (version == NULL || version[0] != ZLIB_VERSION[0] || stream_size != (int)(sizeof(z_stream)))
return Z_VERSION_ERROR;
if (strm == NULL)