gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [gnurl] 71/254: url: let CURLOPT_BUFFERSIZE realloc to smal


From: gnunet
Subject: [GNUnet-SVN] [gnurl] 71/254: url: let CURLOPT_BUFFERSIZE realloc to smaller sizes too
Date: Sat, 17 Jun 2017 16:51:43 +0200

This is an automated email from the git hooks/post-receive script.

ng0 pushed a commit to annotated tag gnurl-7.54.1
in repository gnurl.

commit 4858c451ee54d0104f68408debb3a32947b7b273
Author: Daniel Stenberg <address@hidden>
AuthorDate: Mon May 1 00:31:56 2017 +0200

    url: let CURLOPT_BUFFERSIZE realloc to smaller sizes too
    
    Closes #1449
---
 lib/url.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/url.c b/lib/url.c
index e018927c0..a2e8902f1 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -2298,8 +2298,8 @@ CURLcode Curl_setopt(struct Curl_easy *data, CURLoption 
option,
     else if(arg < READBUFFER_MIN)
       arg = READBUFFER_MIN;
 
-    /* Resize only if larger than default buffer size. */
-    if(arg > READBUFFER_SIZE) {
+    /* Resize if new size */
+    if(arg != data->set.buffer_size) {
       char *newbuff = realloc(data->state.buffer, arg + 1);
       if(!newbuff) {
         DEBUGF(fprintf(stderr, "Error: realloc of buffer failed\n"));

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]