adenilson / rpms / zlib

Forked from rpms/zlib 9 months ago
Clone
feaeae
Subject: [PATCH] Fix types in contrib/minizip to match result of
feaeae
 get_crc_table().
feaeae
feaeae
---
feaeae
 contrib/minizip/crypt.h | 8 ++++----
feaeae
 contrib/minizip/unzip.c | 2 +-
feaeae
 contrib/minizip/zip.c   | 2 +-
feaeae
 3 files changed, 6 insertions(+), 6 deletions(-)
feaeae
feaeae
diff --git a/contrib/minizip/crypt.h b/contrib/minizip/crypt.h
feaeae
index a01d08d..1e9e820 100644
feaeae
--- a/contrib/minizip/crypt.h
feaeae
+++ b/contrib/minizip/crypt.h
feaeae
@@ -32,7 +32,7 @@
feaeae
 /***********************************************************************
feaeae
  * Return the next byte in the pseudo-random sequence
feaeae
  */
feaeae
-static int decrypt_byte(unsigned long* pkeys, const unsigned long* pcrc_32_tab)
feaeae
+static int decrypt_byte(unsigned long* pkeys, const z_crc_t* pcrc_32_tab)
feaeae
 {
feaeae
     unsigned temp;  /* POTENTIAL BUG:  temp*(temp^1) may overflow in an
feaeae
                      * unpredictable manner on 16-bit systems; not a problem
feaeae
@@ -45,7 +45,7 @@ static int decrypt_byte(unsigned long* pkeys, const unsigned long* pcrc_32_tab)
feaeae
 /***********************************************************************
feaeae
  * Update the encryption keys with the next byte of plain text
feaeae
  */
feaeae
-static int update_keys(unsigned long* pkeys,const unsigned long* pcrc_32_tab,int c)
feaeae
+static int update_keys(unsigned long* pkeys,const z_crc_t* pcrc_32_tab,int c)
feaeae
 {
feaeae
     (*(pkeys+0)) = CRC32((*(pkeys+0)), c);
feaeae
     (*(pkeys+1)) += (*(pkeys+0)) & 0xff;
feaeae
@@ -62,7 +62,7 @@ static int update_keys(unsigned long* pkeys,const unsigned long* pcrc_32_tab,int
feaeae
  * Initialize the encryption keys and the random header according to
feaeae
  * the given password.
feaeae
  */
feaeae
-static void init_keys(const char* passwd,unsigned long* pkeys,const unsigned long* pcrc_32_tab)
feaeae
+static void init_keys(const char* passwd,unsigned long* pkeys,const z_crc_t* pcrc_32_tab)
feaeae
 {
feaeae
     *(pkeys+0) = 305419896L;
feaeae
     *(pkeys+1) = 591751049L;
feaeae
@@ -91,7 +91,7 @@ static int crypthead(const char* passwd,      /* password string */
feaeae
                      unsigned char* buf,      /* where to write header */
feaeae
                      int bufSize,
feaeae
                      unsigned long* pkeys,
feaeae
-                     const unsigned long* pcrc_32_tab,
feaeae
+                     const z_crc_t* pcrc_32_tab,
feaeae
                      unsigned long crcForCrypting)
feaeae
 {
feaeae
     int n;                       /* index in random header */
feaeae
diff --git a/contrib/minizip/unzip.c b/contrib/minizip/unzip.c
feaeae
index c160cd0..8499efd 100644
feaeae
--- a/contrib/minizip/unzip.c
feaeae
+++ b/contrib/minizip/unzip.c
feaeae
@@ -184,7 +184,7 @@ typedef struct
feaeae
 
feaeae
 #    ifndef NOUNCRYPT
feaeae
     unsigned long keys[3];     /* keys defining the pseudo-random sequence */
feaeae
-    const unsigned long* pcrc_32_tab;
feaeae
+    const z_crc_t* pcrc_32_tab;
feaeae
 #    endif
feaeae
 } unz64_s;
feaeae
 
feaeae
diff --git a/contrib/minizip/zip.c b/contrib/minizip/zip.c
feaeae
index 147934c..ea54853 100644
feaeae
--- a/contrib/minizip/zip.c
feaeae
+++ b/contrib/minizip/zip.c
feaeae
@@ -157,7 +157,7 @@ typedef struct
feaeae
     ZPOS64_T totalUncompressedData;
feaeae
 #ifndef NOCRYPT
feaeae
     unsigned long keys[3];     /* keys defining the pseudo-random sequence */
feaeae
-    const unsigned long* pcrc_32_tab;
feaeae
+    const z_crc_t* pcrc_32_tab;
feaeae
     int crypt_header_size;
feaeae
 #endif
feaeae
 } curfile64_info;
feaeae
-- 
feaeae
2.26.0
feaeae