]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
urlapi: fix part of conditional expression is always true: qlen
authorPronyushkin Petr <pyetr.pronyushkin@fsight.ru>
Fri, 3 Feb 2023 06:35:15 +0000 (11:35 +0500)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 6 Feb 2023 07:53:07 +0000 (08:53 +0100)
Closes #10408

lib/urlapi.c

index 480ebc9a8f0ef8e9b70a2cc79df6939c1c048fb3..4387e945df45b540e7bb6f79b0dd47acdaa1b038 100644 (file)
@@ -1157,7 +1157,7 @@ static CURLUcode parseurl(const char *url, CURLU *u, unsigned int flags)
     size_t qlen = strlen(query) - fraglen; /* includes '?' */
     pathlen = strlen(path) - qlen - fraglen;
     if(qlen > 1) {
-      if(qlen && (flags & CURLU_URLENCODE)) {
+      if(flags & CURLU_URLENCODE) {
         struct dynbuf enc;
         Curl_dyn_init(&enc, CURL_MAX_INPUT_LENGTH);
         /* skip the leading question mark */