[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnurl] 82/282: curl: avoid using strlen for testing if a string is empt
From: |
gnunet |
Subject: |
[gnurl] 82/282: curl: avoid using strlen for testing if a string is empty |
Date: |
Wed, 01 Apr 2020 14:29:07 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit 2bc373740a341d1454592b53da8d097aec7ba0fd
Author: Orgad Shaneh <address@hidden>
AuthorDate: Mon Feb 3 11:42:46 2020 +0200
curl: avoid using strlen for testing if a string is empty
Closes #4873
---
src/tool_getparam.c | 2 +-
src/tool_operhlp.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/tool_getparam.c b/src/tool_getparam.c
index b757ac8f0..1a72edf3e 100644
--- a/src/tool_getparam.c
+++ b/src/tool_getparam.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;
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.*/
--
To stop receiving notification emails like this one, please contact
address@hidden.
- [gnurl] 56/282: conncache: removed unused Curl_conncache_bundle_size(), (continued)
- [gnurl] 56/282: conncache: removed unused Curl_conncache_bundle_size(), gnunet, 2020/04/01
- [gnurl] 54/282: singleuse.pl: support new API functions, fix curl_dbg_ handling, gnunet, 2020/04/01
- [gnurl] 55/282: strcase: turn Curl_raw_tolower into static, gnunet, 2020/04/01
- [gnurl] 63/282: curl.h: define CURL_WIN32 on windows, gnunet, 2020/04/01
- [gnurl] 57/282: llist: removed unused Curl_llist_move(), gnunet, 2020/04/01
- [gnurl] 59/282: global_init: assume the EINTR bit by default, gnunet, 2020/04/01
- [gnurl] 36/282: polarssl: removed, gnunet, 2020/04/01
- [gnurl] 43/282: data.d: remove "Multiple files can also be specified", gnunet, 2020/04/01
- [gnurl] 49/282: mk-ca-bundle: add support for CKA_NSS_SERVER_DISTRUST_AFTER, gnunet, 2020/04/01
- [gnurl] 72/282: ngtcp2: update to git master and its draft-25 support, gnunet, 2020/04/01
- [gnurl] 82/282: curl: avoid using strlen for testing if a string is empty,
gnunet <=
- [gnurl] 75/282: quiche: Copyright year out of date, gnunet, 2020/04/01
- [gnurl] 65/282: global_init: move the IPv6 works status bool to multi handle, gnunet, 2020/04/01
- [gnurl] 73/282: quiche: update to draft-25, gnunet, 2020/04/01
- [gnurl] 76/282: ntlm: Move the winbind data into the NTLM data structure, gnunet, 2020/04/01
- [gnurl] 74/282: altsvc: use h3-25, gnunet, 2020/04/01
- [gnurl] 80/282: openssl: remove redundant assignment, gnunet, 2020/04/01
- [gnurl] 83/282: tool_operhlp: Copyright year out of date, should be 2020, gnunet, 2020/04/01
- [gnurl] 68/282: multi_done: if multiplexed, make conn->data point to another transfer, gnunet, 2020/04/01
- [gnurl] 81/282: ntlm: Ensure the HTTP header data is not stored in the challenge/response, gnunet, 2020/04/01
- [gnurl] 67/282: location.d: the method change is from POST to GET only, gnunet, 2020/04/01