Lines Matching refs:es
14 static ossl_inline void err_get_slot(ERR_STATE *es) in err_get_slot() argument
16 es->top = (es->top + 1) % ERR_NUM_ERRORS; in err_get_slot()
17 if (es->top == es->bottom) in err_get_slot()
18 es->bottom = (es->bottom + 1) % ERR_NUM_ERRORS; in err_get_slot()
21 static ossl_inline void err_clear_data(ERR_STATE *es, size_t i, int deall) in err_clear_data() argument
23 if (es->err_data_flags[i] & ERR_TXT_MALLOCED) { in err_clear_data()
25 OPENSSL_free(es->err_data[i]); in err_clear_data()
26 es->err_data[i] = NULL; in err_clear_data()
27 es->err_data_size[i] = 0; in err_clear_data()
28 es->err_data_flags[i] = 0; in err_clear_data()
29 } else if (es->err_data[i] != NULL) { in err_clear_data()
30 es->err_data[i][0] = '\0'; in err_clear_data()
31 es->err_data_flags[i] = ERR_TXT_MALLOCED; in err_clear_data()
34 es->err_data[i] = NULL; in err_clear_data()
35 es->err_data_size[i] = 0; in err_clear_data()
36 es->err_data_flags[i] = 0; in err_clear_data()
40 static ossl_inline void err_set_error(ERR_STATE *es, size_t i, in err_set_error() argument
43 es->err_buffer[i] = in err_set_error()
49 static ossl_inline void err_set_debug(ERR_STATE *es, size_t i, in err_set_debug() argument
57 OPENSSL_free(es->err_file[i]); in err_set_debug()
59 es->err_file[i] = NULL; in err_set_debug()
60 else if ((es->err_file[i] = CRYPTO_malloc(strlen(file) + 1, in err_set_debug()
63 strcpy(es->err_file[i], file); in err_set_debug()
65 es->err_line[i] = line; in err_set_debug()
66 OPENSSL_free(es->err_func[i]); in err_set_debug()
68 es->err_func[i] = NULL; in err_set_debug()
69 else if ((es->err_func[i] = CRYPTO_malloc(strlen(fn) + 1, in err_set_debug()
71 strcpy(es->err_func[i], fn); in err_set_debug()
74 static ossl_inline void err_set_data(ERR_STATE *es, size_t i, in err_set_data() argument
77 if ((es->err_data_flags[i] & ERR_TXT_MALLOCED) != 0) in err_set_data()
78 OPENSSL_free(es->err_data[i]); in err_set_data()
79 es->err_data[i] = data; in err_set_data()
80 es->err_data_size[i] = datasz; in err_set_data()
81 es->err_data_flags[i] = flags; in err_set_data()
84 static ossl_inline void err_clear(ERR_STATE *es, size_t i, int deall) in err_clear() argument
86 err_clear_data(es, i, (deall)); in err_clear()
87 es->err_marks[i] = 0; in err_clear()
88 es->err_flags[i] = 0; in err_clear()
89 es->err_buffer[i] = 0; in err_clear()
90 es->err_line[i] = -1; in err_clear()
91 OPENSSL_free(es->err_file[i]); in err_clear()
92 es->err_file[i] = NULL; in err_clear()
93 OPENSSL_free(es->err_func[i]); in err_clear()
94 es->err_func[i] = NULL; in err_clear()