Remove a few dead stores

This commit is contained in:
Manuel Pégourié-Gonnard 2014-01-20 10:27:13 +01:00 committed by Paul Bakker
parent 9e987edf9f
commit 7c59363a85
7 changed files with 6 additions and 18 deletions

View file

@ -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;

View file

@ -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

View file

@ -349,7 +349,8 @@ void ecdsa_free( ecdsa_context *ctx )
*/
int ecdsa_self_test( int verbose )
{
return( verbose++ );
((void) verbose );
return( 0 );
}
#endif

View file

@ -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 )

View file

@ -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;

View file

@ -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;

View file

@ -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;