1
0
mirror of https://github.com/moparisthebest/curl synced 2024-08-13 17:03:50 -04:00

polarssl: remove superfluous for(;;) loop

"unreachable: Since the loop increment is unreachable, the loop body
will never execute more than once."

Coverity CID 1291707
This commit is contained in:
Daniel Stenberg 2015-03-25 08:49:34 +01:00
parent 4e299192ed
commit 24908c12d7

View File

@ -398,9 +398,8 @@ polarssl_connect_step2(struct connectdata *conn,
conn->recv[sockindex] = polarssl_recv; conn->recv[sockindex] = polarssl_recv;
conn->send[sockindex] = polarssl_send; conn->send[sockindex] = polarssl_send;
for(;;) {
if(!(ret = ssl_handshake(&connssl->ssl))) if(!(ret = ssl_handshake(&connssl->ssl)))
break; ;
else if(ret != POLARSSL_ERR_NET_WANT_READ && else if(ret != POLARSSL_ERR_NET_WANT_READ &&
ret != POLARSSL_ERR_NET_WANT_WRITE) { ret != POLARSSL_ERR_NET_WANT_WRITE) {
#ifdef POLARSSL_ERROR_C #ifdef POLARSSL_ERROR_C
@ -422,8 +421,6 @@ polarssl_connect_step2(struct connectdata *conn,
} }
failf(data, "SSL_connect failed with error %d.", ret); failf(data, "SSL_connect failed with error %d.", ret);
return CURLE_SSL_CONNECT_ERROR; return CURLE_SSL_CONNECT_ERROR;
}
} }
infof(data, "PolarSSL: Handshake complete, cipher is %s\n", infof(data, "PolarSSL: Handshake complete, cipher is %s\n",