summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2007-11-15 23:30:59 +0000
committerDaniel Stenberg <daniel@haxx.se>2007-11-15 23:30:59 +0000
commit1125d45397972276ffbc27d9180e0faba10f139c (patch)
tree5ef2f88120f098020a67f3994e1103399662e317 /lib
parent44d408204a7902613c2843b7bfb8dbe073f9fcb8 (diff)
downloadgnurl-1125d45397972276ffbc27d9180e0faba10f139c.tar.gz
gnurl-1125d45397972276ffbc27d9180e0faba10f139c.tar.bz2
gnurl-1125d45397972276ffbc27d9180e0faba10f139c.zip
removed unnecessary check from add_buffer_send() that only was made within
#ifdef CURL_DOES_CONVERSIONS anyway! I turned it into a DEBUGASSERT() instead.
Diffstat (limited to 'lib')
-rw-r--r--lib/http.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/http.c b/lib/http.c
index e7b39ad4b..eba69bdac 100644
--- a/lib/http.c
+++ b/lib/http.c
@@ -943,17 +943,17 @@ CURLcode add_buffer_send(send_buffer *in,
ptr = in->buffer;
size = in->size_used;
+ DEBUGASSERT(size - included_body_bytes > 0);
+
#ifdef CURL_DOES_CONVERSIONS
- if(size - included_body_bytes > 0) {
- res = Curl_convert_to_network(conn->data, ptr, size - included_body_bytes);
- /* Curl_convert_to_network calls failf if unsuccessful */
- if(res != CURLE_OK) {
- /* conversion failed, free memory and return to the caller */
- if(in->buffer)
- free(in->buffer);
- free(in);
- return res;
- }
+ res = Curl_convert_to_network(conn->data, ptr, size - included_body_bytes);
+ /* Curl_convert_to_network calls failf if unsuccessful */
+ if(res != CURLE_OK) {
+ /* conversion failed, free memory and return to the caller */
+ if(in->buffer)
+ free(in->buffer);
+ free(in);
+ return res;
}
#endif /* CURL_DOES_CONVERSIONS */