summaryrefslogtreecommitdiff
path: root/inflate.c
diff options
context:
space:
mode:
authorNoel Gordon <noel@chromium.org>2018-02-07 09:33:01 +0000
committerCommit Bot <commit-bot@chromium.org>2018-02-07 09:33:01 +0000
commit4676581bd099757054c3075af4fc5fd315fe164d (patch)
treece379f0e70046e4d48ea5c80f560ccb5368b531c /inflate.c
parente31b50314a69ef0eb461fc988982268146a3a5d7 (diff)
downloadzlib-4676581bd099757054c3075af4fc5fd315fe164d.tar.gz
Remove x86_check_features() from inflate
adler32 can be freely called like crc32, per the "zlib.h" docs so move the x86 feature check there, which allows us to remove x86_check_features() from zlib inflate. Note inflate() calls adler32(0, Z_NULL, 0); (once only) before using the zlib adler32() routine. A reading from third_party/libpng png.c 2324: /* Now calculate the adler32 if not done already. */ 2327: adler = adler32(0, NULL, 0); 2328: adler = adler32(adler, profile, length); suggests they also conform to the "zlib.h" doc rules about use of the adler32 routine. Bug: 762564 Change-Id: Id84da0eb52bc10edb541a284eab9aef652ba2c72 Reviewed-on: https://chromium-review.googlesource.com/901043 Commit-Queue: Noel Gordon <noel@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#534964} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: c376937e3709ddef4b97621a58039a21b67faa6e
Diffstat (limited to 'inflate.c')
-rw-r--r--inflate.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/inflate.c b/inflate.c
index e84be46..5c40cf1 100644
--- a/inflate.c
+++ b/inflate.c
@@ -84,7 +84,6 @@
#include "inftrees.h"
#include "inflate.h"
#include "inffast.h"
-#include "x86.h"
#ifdef MAKEFIXED
# ifndef BUILDFIXED
@@ -202,8 +201,6 @@ int stream_size;
int ret;
struct inflate_state FAR *state;
- x86_check_features();
-
if (version == Z_NULL || version[0] != ZLIB_VERSION[0] ||
stream_size != (int)(sizeof(z_stream)))
return Z_VERSION_ERROR;