Removes redundant parentheses, whitelists them in generated code (#7721)

This commit is contained in:
Dmitry Kashitsyn
2018-01-31 15:48:37 +07:00
committed by Afri Schoedon
parent dae99cc53e
commit a412f7cca6
15 changed files with 26 additions and 26 deletions

View File

@@ -366,7 +366,7 @@ impl EncryptedConnection {
let padding = (16 - (payload.len() % 16)) % 16;
header.resize(16, 0u8);
let mut packet = vec![0u8; (32 + payload.len() + padding + 16)];
let mut packet = vec![0u8; 32 + payload.len() + padding + 16];
self.encoder.encrypt(&mut RefReadBuffer::new(&header), &mut RefWriteBuffer::new(&mut packet), false).expect("Invalid length or padding");
EncryptedConnection::update_mac(&mut self.egress_mac, &mut self.mac_encoder, &packet[0..16]);
self.egress_mac.clone().finalize(&mut packet[16..32]);