diff options
author | Orgad Shaneh <orgad.shaneh@audiocodes.com> | 2020-02-03 11:42:46 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2020-02-04 08:27:09 +0100 |
commit | 2bc373740a341d1454592b53da8d097aec7ba0fd (patch) | |
tree | cbb9a0e6937f55a20c65272103e438d0e157d5de /src/tool_operhlp.c | |
parent | f41deddde879c15350df880b1c8959bb521cd679 (diff) | |
download | curl-2bc373740a341d1454592b53da8d097aec7ba0fd.tar.gz |
curl: avoid using strlen for testing if a string is empty
Closes #4873
Diffstat (limited to 'src/tool_operhlp.c')
-rw-r--r-- | src/tool_operhlp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tool_operhlp.c b/src/tool_operhlp.c index 8a9b7c9e8..7b9ff7d2a 100644 --- a/src/tool_operhlp.c +++ b/src/tool_operhlp.c @@ -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.*/ |