From: Daniel Stenberg Date: Wed, 8 Oct 2014 10:48:06 +0000 (+0200) Subject: do_sec_send: remove dead code X-Git-Tag: curl-7_39_0~169 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=87c8e00b7af8fa9b910e6455d673146925b7a9cb;p=thirdparty%2Fcurl.git 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. --- diff --git a/lib/security.c b/lib/security.c index 25cfa21706..d1c0369f9b 100644 --- a/lib/security.c +++ b/lib/security.c @@ -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;