X-Git-Url: https://git.openssl.org/?p=openssl.git;a=blobdiff_plain;f=test%2Fuitest.c;h=82c8c59204f49adf7ba5c51e4dbffc905ec54a74;hp=289f32b6b05f50fc838e703d35a77df2bc497683;hb=HEAD;hpb=a43ce58f5569a160272c492c680f2e42d38ec769 diff --git a/test/uitest.c b/test/uitest.c index 289f32b6b0..82c8c59204 100644 --- a/test/uitest.c +++ b/test/uitest.c @@ -1,5 +1,5 @@ /* - * Copyright 2002-2018 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2002-2020 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -37,15 +37,15 @@ static int test_old(void) int ok = 0; if (!TEST_ptr(ui_method = - UI_UTIL_wrap_read_pem_callback( test_pem_password_cb, 0)) + UI_UTIL_wrap_read_pem_callback(test_pem_password_cb, 0)) || !TEST_ptr(ui = UI_new_method(ui_method))) goto err; /* The wrapper passes the UI userdata as the callback userdata param */ UI_add_user_data(ui, defpass); - if (!UI_add_input_string(ui, "prompt", UI_INPUT_FLAG_DEFAULT_PWD, - pass, 0, sizeof(pass) - 1)) + if (UI_add_input_string(ui, "prompt", UI_INPUT_FLAG_DEFAULT_PWD, + pass, 0, sizeof(pass) - 1) <= 0) goto err; switch (UI_process(ui)) { @@ -78,7 +78,7 @@ static int test_new_ui(void) char pass[16]; int ok = 0; - setup_ui_method(); + (void)setup_ui_method(); if (TEST_int_gt(password_callback(pass, sizeof(pass), 0, &cb_data), 0) && TEST_str_eq(pass, cb_data.password)) ok = 1;