do_sec_send: remove dead code

Coverity CID 1241951. The condition 'len >= 0' would always be true at
that point and thus not necessary to check for.
This commit is contained in:
Daniel Stenberg 2014-10-08 12:48:06 +02:00
parent b90f6e87cf
commit 87c8e00b7a

View File

@ -332,7 +332,6 @@ static void do_sec_send(struct connectdata *conn, curl_socket_t fd,
static ssize_t sec_write(struct connectdata *conn, curl_socket_t fd,
const char *buffer, size_t length)
{
/* FIXME: Check for overflow */
ssize_t tx = 0, len = conn->buffer_size;
len -= conn->mech->overhead(conn->app_data, conn->data_prot,
@ -340,10 +339,9 @@ static ssize_t sec_write(struct connectdata *conn, curl_socket_t fd,
if(len <= 0)
len = length;
while(length) {
if(len >= 0 || length < (size_t)len) {
/* FIXME: Check for overflow. */
if(length < (size_t)len)
len = length;
}
do_sec_send(conn, fd, buffer, curlx_sztosi(len));
length -= len;
buffer += len;