Skip to content

Commit 7edad28

Browse files
Fixed possibly undefined variable warnings by initializing variables to 0.
1 parent 37b5c83 commit 7edad28

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

library/entropy.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ int mbedtls_entropy_update_manual( mbedtls_entropy_context *ctx,
258258
*/
259259
static int entropy_gather_internal( mbedtls_entropy_context *ctx )
260260
{
261-
int ret, i, have_one_strong = 0;
261+
int ret = 0, i, have_one_strong = 0;
262262
unsigned char buf[MBEDTLS_ENTROPY_MAX_GATHER];
263263
size_t olen;
264264

library/hmac_drbg.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ int mbedtls_hmac_drbg_update_ret( mbedtls_hmac_drbg_context *ctx,
7474
unsigned char rounds = ( additional != NULL && add_len != 0 ) ? 2 : 1;
7575
unsigned char sep[1];
7676
unsigned char K[MBEDTLS_MD_MAX_SIZE];
77-
int ret;
77+
int ret = 0;
7878

7979
for( sep[0] = 0; sep[0] < rounds; sep[0]++ )
8080
{

0 commit comments

Comments
 (0)