1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-08-01 10:06:53 +03:00

Prefer initializing ret to error values

These initial values shouldn't be used, but in case they accidentally
get used after a code change, fail safe.
This commit is contained in:
Gilles Peskine
2019-09-30 17:29:54 +02:00
parent 7edad28036
commit 006c1b5f4e
2 changed files with 4 additions and 2 deletions

View File

@ -258,7 +258,9 @@ int mbedtls_entropy_update_manual( mbedtls_entropy_context *ctx,
*/
static int entropy_gather_internal( mbedtls_entropy_context *ctx )
{
int ret = 0, i, have_one_strong = 0;
int ret = MBEDTLS_ERR_ENTROPY_SOURCE_FAILED;
int i;
int have_one_strong = 0;
unsigned char buf[MBEDTLS_ENTROPY_MAX_GATHER];
size_t olen;