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

Closes #4873
This commit is contained in:
Orgad Shaneh 2020-02-03 11:42:46 +02:00 committed by Daniel Stenberg
parent f41deddde8
commit 2bc373740a
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
2 changed files with 2 additions and 2 deletions

View file

@ -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.*/