From: Nathan Moinvaziri Date: Sat, 22 Jan 2022 17:28:37 +0000 (-0800) Subject: Use cpu_check_features in inflate and deflate. X-Git-Tag: 2.1.0-beta1~428 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a639a3d43ffcacdde1964fa1d9b4b871916979c0;p=thirdparty%2Fzlib-ng.git Use cpu_check_features in inflate and deflate. --- diff --git a/deflate.c b/deflate.c index 5919cdb36..50c5531f1 100644 --- a/deflate.c +++ b/deflate.c @@ -194,11 +194,7 @@ int32_t Z_EXPORT PREFIX(deflateInit2_)(PREFIX3(stream) *strm, int32_t level, int int wrap = 1; static const char my_version[] = PREFIX2(VERSION); -#if defined(X86_FEATURES) - x86_check_features(); -#elif defined(ARM_FEATURES) - arm_check_features(); -#endif + cpu_check_features(); if (version == NULL || version[0] != my_version[0] || stream_size != sizeof(PREFIX3(stream))) { return Z_VERSION_ERROR; diff --git a/inflate.c b/inflate.c index 1e8806a49..06b37bf40 100644 --- a/inflate.c +++ b/inflate.c @@ -105,11 +105,7 @@ int32_t Z_EXPORT PREFIX(inflateInit2_)(PREFIX3(stream) *strm, int32_t windowBits int32_t ret; struct inflate_state *state; -#if defined(X86_FEATURES) - x86_check_features(); -#elif defined(ARM_FEATURES) - arm_check_features(); -#endif + cpu_check_features(); if (version == NULL || version[0] != PREFIX2(VERSION)[0] || stream_size != (int)(sizeof(PREFIX3(stream)))) return Z_VERSION_ERROR;