diff options
author | Mika Lindqvist <postmaster@raasu.org> | 2017-05-03 20:14:57 +0300 |
---|---|---|
committer | Hans Kristian Rosbach <hk-github@circlestorm.org> | 2017-05-03 19:14:57 +0200 |
commit | 5adc2052ebdd2578fde4ee3ebc500d71e967b8ae (patch) | |
tree | aee917ad21a950e5f1d8616446d38682b55100de /inflate.c | |
parent | a7c7119009a65f2bf554faab19583650bf5fa0f7 (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.c | 2 |
1 files changed, 0 insertions, 2 deletions
@@ -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) |