Skip to content

Commit

Permalink
Bug 1003929: Remove some useless declarations in netwerk/srtp found b…
Browse files Browse the repository at this point in the history
…y scan-build, the LLVM/Clang static analyzer. r=mcmanus
  • Loading branch information
sylvestre committed May 13, 2014
1 parent ed8f0ee commit add4694
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
14 changes: 4 additions & 10 deletions netwerk/srtp/src/crypto/replay/rdbx.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,16 +132,10 @@ index_guess(const xtd_seq_num_t *local,
uint32_t local_roc = (uint32_t)(*local >> 16);
uint16_t local_seq = (uint16_t) *local;
#endif
#ifdef NO_64BIT_MATH
uint32_t guess_roc = ((high32(*guess) << 16) |
(low32(*guess) >> 16));
uint16_t guess_seq = (uint16_t) (low32(*guess));
#else
uint32_t guess_roc = (uint32_t)(*guess >> 16);
uint16_t guess_seq = (uint16_t) *guess;
#endif
uint32_t guess_roc;
uint16_t guess_seq;
int difference;

if (local_seq < seq_num_median) {
if (s - local_seq > seq_num_median) {
guess_roc = local_roc - 1;
Expand All @@ -160,7 +154,7 @@ index_guess(const xtd_seq_num_t *local,
}
}
guess_seq = s;

/* Note: guess_roc is 32 bits, so this generates a 48-bit result! */
#ifdef NO_64BIT_MATH
*guess = make64(guess_roc >> 16,
Expand Down
2 changes: 0 additions & 2 deletions netwerk/srtp/src/srtp/ekt.c
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,6 @@ srtp_stream_init_from_ekt(srtp_stream_t stream,
err_status_t err;
const uint8_t *master_key;
srtp_policy_t srtp_policy;
unsigned master_key_len;
uint32_t roc;

/*
Expand All @@ -178,7 +177,6 @@ srtp_stream_init_from_ekt(srtp_stream_t stream,

if (stream->ekt->data->ekt_cipher_type != EKT_CIPHER_AES_128_ECB)
return err_status_bad_param;
master_key_len = 16;

/* decrypt the Encrypted Master Key field */
master_key = srtcp_packet_get_emk_location(srtcp_hdr, pkt_octet_len);
Expand Down

0 comments on commit add4694

Please sign in to comment.