diff options
| author | Gary Ching-Pang Lin <glin@suse.com> | 2015-03-31 12:14:06 +0800 |
|---|---|---|
| committer | Peter Jones <pjones@redhat.com> | 2015-05-12 13:51:02 -0400 |
| commit | 3285f5394161e2fde1045fd3f9753a625d03a1aa (patch) | |
| tree | a3149decea22d31dfe81cc7054f55d65fc45f46a /Cryptlib/OpenSSL/crypto/comp/c_rle.c | |
| parent | d7cbd4e3927ea272c709e3f0fd28d53fcc074c34 (diff) | |
| download | efi-boot-shim-3285f5394161e2fde1045fd3f9753a625d03a1aa.tar.gz efi-boot-shim-3285f5394161e2fde1045fd3f9753a625d03a1aa.zip | |
Update Cryptlib and openssl
Update Cryptlib to r16559 and openssl to 0.9.8zf
Signed-off-by: Gary Ching-Pang Lin <glin@suse.com>
Diffstat (limited to 'Cryptlib/OpenSSL/crypto/comp/c_rle.c')
| -rw-r--r-- | Cryptlib/OpenSSL/crypto/comp/c_rle.c | 91 |
1 files changed, 46 insertions, 45 deletions
diff --git a/Cryptlib/OpenSSL/crypto/comp/c_rle.c b/Cryptlib/OpenSSL/crypto/comp/c_rle.c index 18bceae5..adf16631 100644 --- a/Cryptlib/OpenSSL/crypto/comp/c_rle.c +++ b/Cryptlib/OpenSSL/crypto/comp/c_rle.c @@ -5,57 +5,58 @@ #include <openssl/comp.h> static int rle_compress_block(COMP_CTX *ctx, unsigned char *out, - unsigned int olen, unsigned char *in, unsigned int ilen); + unsigned int olen, unsigned char *in, + unsigned int ilen); static int rle_expand_block(COMP_CTX *ctx, unsigned char *out, - unsigned int olen, unsigned char *in, unsigned int ilen); - -static COMP_METHOD rle_method={ - NID_rle_compression, - LN_rle_compression, - NULL, - NULL, - rle_compress_block, - rle_expand_block, - NULL, - NULL, - }; + unsigned int olen, unsigned char *in, + unsigned int ilen); + +static COMP_METHOD rle_method = { + NID_rle_compression, + LN_rle_compression, + NULL, + NULL, + rle_compress_block, + rle_expand_block, + NULL, + NULL, +}; COMP_METHOD *COMP_rle(void) - { - return(&rle_method); - } +{ + return (&rle_method); +} static int rle_compress_block(COMP_CTX *ctx, unsigned char *out, - unsigned int olen, unsigned char *in, unsigned int ilen) - { - /* int i; */ + unsigned int olen, unsigned char *in, + unsigned int ilen) +{ + /* int i; */ - if (olen < (ilen+1)) - { - /* ZZZZZZZZZZZZZZZZZZZZZZ */ - return(-1); - } + if (olen < (ilen + 1)) { + /* ZZZZZZZZZZZZZZZZZZZZZZ */ + return (-1); + } - *(out++)=0; - memcpy(out,in,ilen); - return(ilen+1); - } + *(out++) = 0; + memcpy(out, in, ilen); + return (ilen + 1); +} static int rle_expand_block(COMP_CTX *ctx, unsigned char *out, - unsigned int olen, unsigned char *in, unsigned int ilen) - { - int i; - - if (ilen == 0 || olen < (ilen-1)) - { - /* ZZZZZZZZZZZZZZZZZZZZZZ */ - return(-1); - } - - i= *(in++); - if (i == 0) - { - memcpy(out,in,ilen-1); - } - return(ilen-1); - } + unsigned int olen, unsigned char *in, + unsigned int ilen) +{ + int i; + + if (ilen == 0 || olen < (ilen - 1)) { + /* ZZZZZZZZZZZZZZZZZZZZZZ */ + return (-1); + } + + i = *(in++); + if (i == 0) { + memcpy(out, in, ilen - 1); + } + return (ilen - 1); +} |
