Merge pull request #1697 from embhorn/zd4060

Dead code in wolfSSL_BIO_gets()
This commit is contained in:
David Garske 2018-07-18 09:22:35 -07:00 committed by GitHub
commit 52aac6e641
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -580,8 +580,8 @@ int wolfSSL_BIO_gets(WOLFSSL_BIO* bio, char* buf, int sz)
const byte* c;
int cSz;
cSz = wolfSSL_BIO_pending(bio);
if (cSz <= 0) {
ret = (ret == 0) ? 0 /* Nothing read */ : cSz /* error */;
if (cSz == 0) {
ret = 0; /* Nothing to read */
buf[0] = '\0';
break;
}