From 9f5ede0a00567a7e4f5cd5ef85edd007795c0a30 Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Fri, 18 Mar 2011 10:11:06 +0000 Subject: Import from zlib-1.2.4 --- cpukit/zlib/contrib/minizip/crypt.h | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'cpukit') diff --git a/cpukit/zlib/contrib/minizip/crypt.h b/cpukit/zlib/contrib/minizip/crypt.h index 622f4bc2ec..a01d08d932 100644 --- a/cpukit/zlib/contrib/minizip/crypt.h +++ b/cpukit/zlib/contrib/minizip/crypt.h @@ -87,13 +87,12 @@ static void init_keys(const char* passwd,unsigned long* pkeys,const unsigned lon # define ZCR_SEED2 3141592654UL /* use PI as default pattern */ # endif -static int crypthead(passwd, buf, bufSize, pkeys, pcrc_32_tab, crcForCrypting) - const char *passwd; /* password string */ - unsigned char *buf; /* where to write header */ - int bufSize; - unsigned long* pkeys; - const unsigned long* pcrc_32_tab; - unsigned long crcForCrypting; +static int crypthead(const char* passwd, /* password string */ + unsigned char* buf, /* where to write header */ + int bufSize, + unsigned long* pkeys, + const unsigned long* pcrc_32_tab, + unsigned long crcForCrypting) { int n; /* index in random header */ int t; /* temporary */ @@ -124,8 +123,8 @@ static int crypthead(passwd, buf, bufSize, pkeys, pcrc_32_tab, crcForCrypting) { buf[n] = (unsigned char)zencode(pkeys, pcrc_32_tab, header[n], t); } - buf[n++] = zencode(pkeys, pcrc_32_tab, (int)(crcForCrypting >> 16) & 0xff, t); - buf[n++] = zencode(pkeys, pcrc_32_tab, (int)(crcForCrypting >> 24) & 0xff, t); + buf[n++] = (unsigned char)zencode(pkeys, pcrc_32_tab, (int)(crcForCrypting >> 16) & 0xff, t); + buf[n++] = (unsigned char)zencode(pkeys, pcrc_32_tab, (int)(crcForCrypting >> 24) & 0xff, t); return n; } -- cgit v1.2.3