diff options
Diffstat (limited to 'src/lib/libcrypto/comp/comp_err.c')
-rw-r--r-- | src/lib/libcrypto/comp/comp_err.c | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/src/lib/libcrypto/comp/comp_err.c b/src/lib/libcrypto/comp/comp_err.c index 187d68b725..1652b8c2c4 100644 --- a/src/lib/libcrypto/comp/comp_err.c +++ b/src/lib/libcrypto/comp/comp_err.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* crypto/comp/comp_err.c */ | 1 | /* crypto/comp/comp_err.c */ |
2 | /* ==================================================================== | 2 | /* ==================================================================== |
3 | * Copyright (c) 1999-2008 The OpenSSL Project. All rights reserved. | 3 | * Copyright (c) 1999 The OpenSSL Project. All rights reserved. |
4 | * | 4 | * |
5 | * Redistribution and use in source and binary forms, with or without | 5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions | 6 | * modification, are permitted provided that the following conditions |
@@ -64,24 +64,13 @@ | |||
64 | 64 | ||
65 | /* BEGIN ERROR CODES */ | 65 | /* BEGIN ERROR CODES */ |
66 | #ifndef OPENSSL_NO_ERR | 66 | #ifndef OPENSSL_NO_ERR |
67 | |||
68 | #define ERR_FUNC(func) ERR_PACK(ERR_LIB_COMP,func,0) | ||
69 | #define ERR_REASON(reason) ERR_PACK(ERR_LIB_COMP,0,reason) | ||
70 | |||
71 | static ERR_STRING_DATA COMP_str_functs[]= | 67 | static ERR_STRING_DATA COMP_str_functs[]= |
72 | { | 68 | { |
73 | {ERR_FUNC(COMP_F_BIO_ZLIB_FLUSH), "BIO_ZLIB_FLUSH"}, | ||
74 | {ERR_FUNC(COMP_F_BIO_ZLIB_NEW), "BIO_ZLIB_NEW"}, | ||
75 | {ERR_FUNC(COMP_F_BIO_ZLIB_READ), "BIO_ZLIB_READ"}, | ||
76 | {ERR_FUNC(COMP_F_BIO_ZLIB_WRITE), "BIO_ZLIB_WRITE"}, | ||
77 | {0,NULL} | 69 | {0,NULL} |
78 | }; | 70 | }; |
79 | 71 | ||
80 | static ERR_STRING_DATA COMP_str_reasons[]= | 72 | static ERR_STRING_DATA COMP_str_reasons[]= |
81 | { | 73 | { |
82 | {ERR_REASON(COMP_R_ZLIB_DEFLATE_ERROR) ,"zlib deflate error"}, | ||
83 | {ERR_REASON(COMP_R_ZLIB_INFLATE_ERROR) ,"zlib inflate error"}, | ||
84 | {ERR_REASON(COMP_R_ZLIB_NOT_SUPPORTED) ,"zlib not supported"}, | ||
85 | {0,NULL} | 74 | {0,NULL} |
86 | }; | 75 | }; |
87 | 76 | ||
@@ -89,12 +78,15 @@ static ERR_STRING_DATA COMP_str_reasons[]= | |||
89 | 78 | ||
90 | void ERR_load_COMP_strings(void) | 79 | void ERR_load_COMP_strings(void) |
91 | { | 80 | { |
92 | #ifndef OPENSSL_NO_ERR | 81 | static int init=1; |
93 | 82 | ||
94 | if (ERR_func_error_string(COMP_str_functs[0].error) == NULL) | 83 | if (init) |
95 | { | 84 | { |
96 | ERR_load_strings(0,COMP_str_functs); | 85 | init=0; |
97 | ERR_load_strings(0,COMP_str_reasons); | 86 | #ifndef OPENSSL_NO_ERR |
98 | } | 87 | ERR_load_strings(ERR_LIB_COMP,COMP_str_functs); |
88 | ERR_load_strings(ERR_LIB_COMP,COMP_str_reasons); | ||
99 | #endif | 89 | #endif |
90 | |||
91 | } | ||
100 | } | 92 | } |