summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/buffer/buf_err.c
diff options
context:
space:
mode:
authorjsing <>2014-04-17 13:58:24 +0000
committerjsing <>2014-04-17 13:58:24 +0000
commit4d658765f455801c1d1126cbc173d66774f3980a (patch)
treed76c6845248b3998e222842a23e7fde7b83baffd /src/lib/libcrypto/buffer/buf_err.c
parentbf88a7952ef33375ff6392744b62a343a5c2aa35 (diff)
downloadopenbsd-4d658765f455801c1d1126cbc173d66774f3980a.tar.gz
openbsd-4d658765f455801c1d1126cbc173d66774f3980a.tar.bz2
openbsd-4d658765f455801c1d1126cbc173d66774f3980a.zip
Initial KNF.
Diffstat (limited to 'src/lib/libcrypto/buffer/buf_err.c')
-rw-r--r--src/lib/libcrypto/buffer/buf_err.c45
1 files changed, 21 insertions, 24 deletions
diff --git a/src/lib/libcrypto/buffer/buf_err.c b/src/lib/libcrypto/buffer/buf_err.c
index 8f1de6192b..4e1949199a 100644
--- a/src/lib/libcrypto/buffer/buf_err.c
+++ b/src/lib/libcrypto/buffer/buf_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,32 +68,29 @@
68#define ERR_FUNC(func) ERR_PACK(ERR_LIB_BUF,func,0) 68#define ERR_FUNC(func) ERR_PACK(ERR_LIB_BUF,func,0)
69#define ERR_REASON(reason) ERR_PACK(ERR_LIB_BUF,0,reason) 69#define ERR_REASON(reason) ERR_PACK(ERR_LIB_BUF,0,reason)
70 70
71static ERR_STRING_DATA BUF_str_functs[]= 71static ERR_STRING_DATA BUF_str_functs[] = {
72 { 72 {ERR_FUNC(BUF_F_BUF_MEMDUP), "BUF_memdup"},
73{ERR_FUNC(BUF_F_BUF_MEMDUP), "BUF_memdup"}, 73 {ERR_FUNC(BUF_F_BUF_MEM_GROW), "BUF_MEM_grow"},
74{ERR_FUNC(BUF_F_BUF_MEM_GROW), "BUF_MEM_grow"}, 74 {ERR_FUNC(BUF_F_BUF_MEM_GROW_CLEAN), "BUF_MEM_grow_clean"},
75{ERR_FUNC(BUF_F_BUF_MEM_GROW_CLEAN), "BUF_MEM_grow_clean"}, 75 {ERR_FUNC(BUF_F_BUF_MEM_NEW), "BUF_MEM_new"},
76{ERR_FUNC(BUF_F_BUF_MEM_NEW), "BUF_MEM_new"}, 76 {ERR_FUNC(BUF_F_BUF_STRDUP), "BUF_strdup"},
77{ERR_FUNC(BUF_F_BUF_STRDUP), "BUF_strdup"}, 77 {ERR_FUNC(BUF_F_BUF_STRNDUP), "BUF_strndup"},
78{ERR_FUNC(BUF_F_BUF_STRNDUP), "BUF_strndup"}, 78 {0, NULL}
79{0,NULL} 79};
80 };
81 80
82static ERR_STRING_DATA BUF_str_reasons[]= 81static ERR_STRING_DATA BUF_str_reasons[] = {
83 { 82 {0, NULL}
84{0,NULL} 83};
85 };
86 84
87#endif 85#endif
88 86
89void ERR_load_BUF_strings(void) 87void
90 { 88ERR_load_BUF_strings(void)
89{
91#ifndef OPENSSL_NO_ERR 90#ifndef OPENSSL_NO_ERR
92 91 if (ERR_func_error_string(BUF_str_functs[0].error) == NULL) {
93 if (ERR_func_error_string(BUF_str_functs[0].error) == NULL) 92 ERR_load_strings(0, BUF_str_functs);
94 { 93 ERR_load_strings(0, BUF_str_reasons);
95 ERR_load_strings(0,BUF_str_functs);
96 ERR_load_strings(0,BUF_str_reasons);
97 }
98#endif
99 } 94 }
95#endif
96}