summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/comp/comp_err.c
diff options
context:
space:
mode:
authordjm <>2008-09-06 12:17:54 +0000
committerdjm <>2008-09-06 12:17:54 +0000
commit38ce604e3cc97706b876b0525ddff0121115456d (patch)
tree7ccc28afe1789ea3dbedf72365f955d5b8e105b5 /src/lib/libcrypto/comp/comp_err.c
parent12867252827c8efaa8ddd1fa3b3d6e321e2bcdef (diff)
downloadopenbsd-38ce604e3cc97706b876b0525ddff0121115456d.tar.gz
openbsd-38ce604e3cc97706b876b0525ddff0121115456d.tar.bz2
openbsd-38ce604e3cc97706b876b0525ddff0121115456d.zip
resolve conflicts
Diffstat (limited to 'src/lib/libcrypto/comp/comp_err.c')
-rw-r--r--src/lib/libcrypto/comp/comp_err.c26
1 files changed, 17 insertions, 9 deletions
diff --git a/src/lib/libcrypto/comp/comp_err.c b/src/lib/libcrypto/comp/comp_err.c
index 1652b8c2c4..187d68b725 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 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2008 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,13 +64,24 @@
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
67static ERR_STRING_DATA COMP_str_functs[]= 71static ERR_STRING_DATA COMP_str_functs[]=
68 { 72 {
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"},
69{0,NULL} 77{0,NULL}
70 }; 78 };
71 79
72static ERR_STRING_DATA COMP_str_reasons[]= 80static ERR_STRING_DATA COMP_str_reasons[]=
73 { 81 {
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"},
74{0,NULL} 85{0,NULL}
75 }; 86 };
76 87
@@ -78,15 +89,12 @@ static ERR_STRING_DATA COMP_str_reasons[]=
78 89
79void ERR_load_COMP_strings(void) 90void ERR_load_COMP_strings(void)
80 { 91 {
81 static int init=1;
82
83 if (init)
84 {
85 init=0;
86#ifndef OPENSSL_NO_ERR 92#ifndef OPENSSL_NO_ERR
87 ERR_load_strings(ERR_LIB_COMP,COMP_str_functs);
88 ERR_load_strings(ERR_LIB_COMP,COMP_str_reasons);
89#endif
90 93
94 if (ERR_func_error_string(COMP_str_functs[0].error) == NULL)
95 {
96 ERR_load_strings(0,COMP_str_functs);
97 ERR_load_strings(0,COMP_str_reasons);
91 } 98 }
99#endif
92 } 100 }