diff options
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libcrypto/ui/ui_lib.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/lib/libcrypto/ui/ui_lib.c b/src/lib/libcrypto/ui/ui_lib.c index 1045cb9992..36cbba2e63 100644 --- a/src/lib/libcrypto/ui/ui_lib.c +++ b/src/lib/libcrypto/ui/ui_lib.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ui_lib.c,v 1.38 2020/09/24 19:31:01 tb Exp $ */ | 1 | /* $OpenBSD: ui_lib.c,v 1.39 2020/09/25 10:46:12 tb Exp $ */ |
2 | /* Written by Richard Levitte (richard@levitte.org) for the OpenSSL | 2 | /* Written by Richard Levitte (richard@levitte.org) for the OpenSSL |
3 | * project 2001. | 3 | * project 2001. |
4 | */ | 4 | */ |
@@ -393,8 +393,9 @@ UI_get0_result(UI *ui, int i) | |||
393 | } | 393 | } |
394 | 394 | ||
395 | static int | 395 | static int |
396 | print_error(const char *str, size_t len, UI *ui) | 396 | print_error(const char *str, size_t len, void *arg) |
397 | { | 397 | { |
398 | UI *ui = arg; | ||
398 | UI_STRING uis; | 399 | UI_STRING uis; |
399 | 400 | ||
400 | memset(&uis, 0, sizeof(uis)); | 401 | memset(&uis, 0, sizeof(uis)); |
@@ -416,9 +417,7 @@ UI_process(UI *ui) | |||
416 | return -1; | 417 | return -1; |
417 | 418 | ||
418 | if (ui->flags & UI_FLAG_PRINT_ERRORS) | 419 | if (ui->flags & UI_FLAG_PRINT_ERRORS) |
419 | ERR_print_errors_cb( | 420 | ERR_print_errors_cb(print_error, ui); |
420 | (int (*)(const char *, size_t, void *)) print_error, | ||
421 | (void *)ui); | ||
422 | 421 | ||
423 | for (i = 0; i < sk_UI_STRING_num(ui->strings); i++) { | 422 | for (i = 0; i < sk_UI_STRING_num(ui->strings); i++) { |
424 | if (ui->meth->ui_write_string && | 423 | if (ui->meth->ui_write_string && |