summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/comp/comp_err.c
diff options
context:
space:
mode:
authorjsing <>2014-04-26 13:04:24 +0000
committerjsing <>2014-04-26 13:04:24 +0000
commit881a5b100e88cfb566ac3dadda9aa58488a5aaf9 (patch)
tree16b961d6fbca1609959ab8356b98834930b718ab /src/lib/libcrypto/comp/comp_err.c
parent9252e528b8dc5bc122ec8aeb936555f5879863d8 (diff)
downloadopenbsd-881a5b100e88cfb566ac3dadda9aa58488a5aaf9.tar.gz
openbsd-881a5b100e88cfb566ac3dadda9aa58488a5aaf9.tar.bz2
openbsd-881a5b100e88cfb566ac3dadda9aa58488a5aaf9.zip
KNF.
Diffstat (limited to 'src/lib/libcrypto/comp/comp_err.c')
-rw-r--r--src/lib/libcrypto/comp/comp_err.c47
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
71static ERR_STRING_DATA COMP_str_functs[]= 71static 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
80static ERR_STRING_DATA COMP_str_reasons[]= 79static 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
90void ERR_load_COMP_strings(void) 88void
91 { 89ERR_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}