mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-12-23 13:05:28 +00:00
Remove a few dead stores
This commit is contained in:
parent
9e987edf9f
commit
7c59363a85
|
@ -105,7 +105,7 @@ static int block_cipher_df( unsigned char *output,
|
|||
unsigned char tmp[CTR_DRBG_SEEDLEN];
|
||||
unsigned char key[CTR_DRBG_KEYSIZE];
|
||||
unsigned char chain[CTR_DRBG_BLOCKSIZE];
|
||||
unsigned char *p = buf, *iv;
|
||||
unsigned char *p, *iv;
|
||||
aes_context aes_ctx;
|
||||
|
||||
int i, j;
|
||||
|
|
|
@ -258,7 +258,8 @@ int ecdh_calc_secret( ecdh_context *ctx, size_t *olen,
|
|||
*/
|
||||
int ecdh_self_test( int verbose )
|
||||
{
|
||||
return( verbose++ );
|
||||
((void) verbose );
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -349,7 +349,8 @@ void ecdsa_free( ecdsa_context *ctx )
|
|||
*/
|
||||
int ecdsa_self_test( int verbose )
|
||||
{
|
||||
return( verbose++ );
|
||||
((void) verbose );
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -911,8 +911,6 @@ int rsa_rsassa_pss_sign( rsa_context *ctx,
|
|||
|
||||
memset( sig, 0, olen );
|
||||
|
||||
msb = mpi_msb( &ctx->N ) - 1;
|
||||
|
||||
// Generate salt of length slen
|
||||
//
|
||||
if( ( ret = f_rng( p_rng, salt, slen ) ) != 0 )
|
||||
|
|
|
@ -1097,8 +1097,6 @@ static int ssl_encrypt_buf( ssl_context *ssl )
|
|||
unsigned char add_data[13];
|
||||
int ret = POLARSSL_ERR_SSL_FEATURE_UNAVAILABLE;
|
||||
|
||||
enc_msglen = ssl->out_msglen;
|
||||
|
||||
memcpy( add_data, ssl->out_ctr, 8 );
|
||||
add_data[8] = ssl->out_msgtype;
|
||||
add_data[9] = ssl->major_ver;
|
||||
|
|
|
@ -543,8 +543,6 @@ static int x509_crt_parse_der_core( x509_crt *crt, const unsigned char *buf,
|
|||
|
||||
memcpy( p, buf, buflen );
|
||||
|
||||
buflen = 0;
|
||||
|
||||
crt->raw.p = p;
|
||||
crt->raw.len = len;
|
||||
end = p + len;
|
||||
|
|
|
@ -112,13 +112,7 @@ int x509_csr_parse( x509_csr *csr, const unsigned char *buf, size_t buflen )
|
|||
if( ret == 0 )
|
||||
{
|
||||
/*
|
||||
* Was PEM encoded
|
||||
*/
|
||||
buflen -= use_len;
|
||||
buf += use_len;
|
||||
|
||||
/*
|
||||
* Steal PEM buffer
|
||||
* Was PEM encoded, steal PEM buffer
|
||||
*/
|
||||
p = pem.buf;
|
||||
pem.buf = NULL;
|
||||
|
@ -142,8 +136,6 @@ int x509_csr_parse( x509_csr *csr, const unsigned char *buf, size_t buflen )
|
|||
return( POLARSSL_ERR_X509_MALLOC_FAILED );
|
||||
|
||||
memcpy( p, buf, buflen );
|
||||
|
||||
buflen = 0;
|
||||
}
|
||||
|
||||
csr->raw.p = p;
|
||||
|
|
Loading…
Reference in a new issue