From: tb Date: Fri, 5 Jan 2024 10:18:52 +0000 (+0000) Subject: evp_key.c: Remove more unnecessary parentheses X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=fb8a40b81df819d72f6e70b70b0aa3c704733c8c;p=openbsd evp_key.c: Remove more unnecessary parentheses --- diff --git a/lib/libcrypto/evp/evp_key.c b/lib/libcrypto/evp/evp_key.c index d6ce373735a..1f3d7582686 100644 --- a/lib/libcrypto/evp/evp_key.c +++ b/lib/libcrypto/evp/evp_key.c @@ -1,4 +1,4 @@ -/* $OpenBSD: evp_key.c,v 1.32 2024/01/05 10:15:36 tb Exp $ */ +/* $OpenBSD: evp_key.c,v 1.33 2024/01/05 10:18:52 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -75,18 +75,17 @@ EVP_set_pw_prompt(const char *prompt) { if (prompt == NULL) prompt_string[0] = '\0'; - else { + else strlcpy(prompt_string, prompt, sizeof(prompt_string)); - } } char * EVP_get_pw_prompt(void) { if (prompt_string[0] == '\0') - return (NULL); - else - return (prompt_string); + return NULL; + + return prompt_string; } int @@ -155,7 +154,7 @@ EVP_BytesToKey(const EVP_CIPHER *type, const EVP_MD *md, } if (data == NULL) - return (nkey); + return nkey; EVP_MD_CTX_init(&c); for (;;) {