diff options
| author | jsing <> | 2014-04-26 13:04:24 +0000 |
|---|---|---|
| committer | jsing <> | 2014-04-26 13:04:24 +0000 |
| commit | 736c0c95b47ee556d9a6fb4500ce6337182d3211 (patch) | |
| tree | 16b961d6fbca1609959ab8356b98834930b718ab /src/lib/libcrypto/comp/comp_err.c | |
| parent | 5087339f6e3e7f1844f34d1eafcf82aca1eb9440 (diff) | |
| download | openbsd-736c0c95b47ee556d9a6fb4500ce6337182d3211.tar.gz openbsd-736c0c95b47ee556d9a6fb4500ce6337182d3211.tar.bz2 openbsd-736c0c95b47ee556d9a6fb4500ce6337182d3211.zip | |
KNF.
Diffstat (limited to 'src/lib/libcrypto/comp/comp_err.c')
| -rw-r--r-- | src/lib/libcrypto/comp/comp_err.c | 47 |
1 files changed, 22 insertions, 25 deletions
diff --git a/src/lib/libcrypto/comp/comp_err.c b/src/lib/libcrypto/comp/comp_err.c index 661c94c3a4..982c58567a 100644 --- a/src/lib/libcrypto/comp/comp_err.c +++ b/src/lib/libcrypto/comp/comp_err.c | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | * are met: | 7 | * are met: |
| 8 | * | 8 | * |
| 9 | * 1. Redistributions of source code must retain the above copyright | 9 | * 1. Redistributions of source code must retain the above copyright |
| 10 | * notice, this list of conditions and the following disclaimer. | 10 | * notice, this list of conditions and the following disclaimer. |
| 11 | * | 11 | * |
| 12 | * 2. Redistributions in binary form must reproduce the above copyright | 12 | * 2. Redistributions in binary form must reproduce the above copyright |
| 13 | * notice, this list of conditions and the following disclaimer in | 13 | * notice, this list of conditions and the following disclaimer in |
| @@ -68,33 +68,30 @@ | |||
| 68 | #define ERR_FUNC(func) ERR_PACK(ERR_LIB_COMP,func,0) | 68 | #define ERR_FUNC(func) ERR_PACK(ERR_LIB_COMP,func,0) |
| 69 | #define ERR_REASON(reason) ERR_PACK(ERR_LIB_COMP,0,reason) | 69 | #define ERR_REASON(reason) ERR_PACK(ERR_LIB_COMP,0,reason) |
| 70 | 70 | ||
| 71 | static ERR_STRING_DATA COMP_str_functs[]= | 71 | static ERR_STRING_DATA COMP_str_functs[] = { |
| 72 | { | 72 | {ERR_FUNC(COMP_F_BIO_ZLIB_FLUSH), "BIO_ZLIB_FLUSH"}, |
| 73 | {ERR_FUNC(COMP_F_BIO_ZLIB_FLUSH), "BIO_ZLIB_FLUSH"}, | 73 | {ERR_FUNC(COMP_F_BIO_ZLIB_NEW), "BIO_ZLIB_NEW"}, |
| 74 | {ERR_FUNC(COMP_F_BIO_ZLIB_NEW), "BIO_ZLIB_NEW"}, | 74 | {ERR_FUNC(COMP_F_BIO_ZLIB_READ), "BIO_ZLIB_READ"}, |
| 75 | {ERR_FUNC(COMP_F_BIO_ZLIB_READ), "BIO_ZLIB_READ"}, | 75 | {ERR_FUNC(COMP_F_BIO_ZLIB_WRITE), "BIO_ZLIB_WRITE"}, |
| 76 | {ERR_FUNC(COMP_F_BIO_ZLIB_WRITE), "BIO_ZLIB_WRITE"}, | 76 | {0, NULL} |
| 77 | {0,NULL} | 77 | }; |
| 78 | }; | ||
| 79 | 78 | ||
| 80 | static ERR_STRING_DATA COMP_str_reasons[]= | 79 | static ERR_STRING_DATA COMP_str_reasons[] = { |
| 81 | { | 80 | {ERR_REASON(COMP_R_ZLIB_DEFLATE_ERROR) , "zlib deflate error"}, |
| 82 | {ERR_REASON(COMP_R_ZLIB_DEFLATE_ERROR) ,"zlib deflate error"}, | 81 | {ERR_REASON(COMP_R_ZLIB_INFLATE_ERROR) , "zlib inflate error"}, |
| 83 | {ERR_REASON(COMP_R_ZLIB_INFLATE_ERROR) ,"zlib inflate error"}, | 82 | {ERR_REASON(COMP_R_ZLIB_NOT_SUPPORTED) , "zlib not supported"}, |
| 84 | {ERR_REASON(COMP_R_ZLIB_NOT_SUPPORTED) ,"zlib not supported"}, | 83 | {0, NULL} |
| 85 | {0,NULL} | 84 | }; |
| 86 | }; | ||
| 87 | 85 | ||
| 88 | #endif | 86 | #endif |
| 89 | 87 | ||
| 90 | void ERR_load_COMP_strings(void) | 88 | void |
| 91 | { | 89 | ERR_load_COMP_strings(void) |
| 90 | { | ||
| 92 | #ifndef OPENSSL_NO_ERR | 91 | #ifndef OPENSSL_NO_ERR |
| 93 | 92 | if (ERR_func_error_string(COMP_str_functs[0].error) == NULL) { | |
| 94 | if (ERR_func_error_string(COMP_str_functs[0].error) == NULL) | 93 | ERR_load_strings(0, COMP_str_functs); |
| 95 | { | 94 | ERR_load_strings(0, COMP_str_reasons); |
| 96 | ERR_load_strings(0,COMP_str_functs); | ||
| 97 | ERR_load_strings(0,COMP_str_reasons); | ||
| 98 | } | ||
| 99 | #endif | ||
| 100 | } | 95 | } |
| 96 | #endif | ||
| 97 | } | ||
