]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
http_chunks: remove unused 'endptr' variable
authorDaniel Stenberg <daniel@haxx.se>
Mon, 26 Feb 2024 11:27:07 +0000 (12:27 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 26 Feb 2024 16:20:51 +0000 (17:20 +0100)
Closes #12996

lib/http_chunks.c

index ad1ee9adab67bb72be0d44688d66fed34d636741..959edb2a4d054c9400a9a8896992fa7c45053aac 100644 (file)
@@ -155,7 +155,6 @@ static CURLcode httpchunk_readwrite(struct Curl_easy *data,
         (*pconsumed)++;
       }
       else {
-        char *endptr;
         if(0 == ch->hexindex) {
           /* This is illegal data, we received junk where we expected
              a hexadecimal digit. */
@@ -167,7 +166,7 @@ static CURLcode httpchunk_readwrite(struct Curl_easy *data,
 
         /* blen and buf are unmodified */
         ch->hexbuffer[ch->hexindex] = 0;
-        if(curlx_strtoofft(ch->hexbuffer, &endptr, 16, &ch->datasize)) {
+        if(curlx_strtoofft(ch->hexbuffer, NULL, 16, &ch->datasize)) {
           failf(data, "chunk hex-length not valid: '%s'", ch->hexbuffer);
           ch->state = CHUNK_FAILED;
           ch->last_code = CHUNKE_ILLEGAL_HEX;