diff options
author | Daniel Stenberg <daniel@haxx.se> | 2014-10-08 12:48:06 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2014-10-08 12:48:06 +0200 |
commit | 87c8e00b7af8fa9b910e6455d673146925b7a9cb (patch) | |
tree | 30e4ad7e8904622dfb3d35e16785f66627082050 /lib/security.c | |
parent | b90f6e87cf2acd1f4e1516a220ad1e23f826f788 (diff) | |
download | curl-87c8e00b7af8fa9b910e6455d673146925b7a9cb.tar.gz |
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.
Diffstat (limited to 'lib/security.c')
-rw-r--r-- | lib/security.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/security.c b/lib/security.c index 25cfa2170..d1c0369f9 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; |