Skip to content
Permalink
Browse files

curl: avoid using strlen for testing if a string is empty

Closes #4873
  • Loading branch information
orgads authored and bagder committed Feb 3, 2020
1 parent f41dedd commit 2bc373740a341d1454592b53da8d097aec7ba0fd
Showing with 2 additions and 2 deletions.
  1. +1 −1 src/tool_getparam.c
  2. +1 −1 src/tool_operhlp.c
@@ -422,7 +422,7 @@ void parse_cert_parameter(const char *cert_parameter,
/* escaped colons and Windows drive letter colons were handled
* above; if we're still here, this is a separating colon */
param_place++;
if(strlen(param_place) > 0) {
if(*param_place) {
*passphrase = strdup(param_place);
}
goto done;
@@ -85,7 +85,7 @@ char *add_file_name_to_url(char *url, const char *filename)
else
ptr = url;
ptr = strrchr(ptr, '/');
if(!ptr || !strlen(++ptr)) {
if(!ptr || !*++ptr) {
/* The URL has no file name part, add the local file name. In order
to be able to do so, we have to create a new URL in another
buffer.*/

0 comments on commit 2bc3737

Please sign in to comment.
You can’t perform that action at this time.