Commit 1125d453 authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

removed unnecessary check from add_buffer_send() that only was made within

#ifdef CURL_DOES_CONVERSIONS anyway! I turned it into a DEBUGASSERT() instead.
parent 44d40820
Loading
Loading
Loading
Loading
+10 −10
Original line number Diff line number Diff line
@@ -943,8 +943,9 @@ 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) {
@@ -954,7 +955,6 @@ CURLcode add_buffer_send(send_buffer *in,
    free(in);
    return res;
  }
  }
#endif /* CURL_DOES_CONVERSIONS */

  if(conn->protocol & PROT_HTTPS) {