From: Daniel Gustafsson Date: Mon, 2 May 2022 12:04:59 +0000 (+0200) Subject: tool_getparam: simplify conditional statement X-Git-Tag: curl-7_83_1~47 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=79bf349a50d187b1ecabbceef5b539b0ec1ec507;p=thirdparty%2Fcurl.git tool_getparam: simplify conditional statement param_place cannot be NULL here since we immediately efter this block perform arithmetic on it (and use it in order to get here) so there is little reason to check. Closes: #8786 Reviewed-by: Daniel Stenberg --- diff --git a/src/tool_getparam.c b/src/tool_getparam.c index 67de74dff7..cff1839b03 100644 --- a/src/tool_getparam.c +++ b/src/tool_getparam.c @@ -420,10 +420,9 @@ void parse_cert_parameter(const char *cert_parameter, separator, but we try to detect when it is used for a file name! On windows. */ #ifdef WIN32 - if(param_place && - (param_place == &cert_parameter[1]) && - (cert_parameter[2] == '\\' || cert_parameter[2] == '/') && - (ISALPHA(cert_parameter[0])) ) { + if((param_place == &cert_parameter[1]) && + (cert_parameter[2] == '\\' || cert_parameter[2] == '/') && + (ISALPHA(cert_parameter[0])) ) { /* colon in the second column, followed by a backslash, and the first character is an alphabetic letter: