mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-02-22 11:22:26 +00:00
tpm: drop unnecessary cast
Signed-off-by: Wei Liu <liuwe@microsoft.com>
This commit is contained in:
parent
2d2f356d94
commit
8e996ff2fe
@ -197,12 +197,12 @@ impl Emulator {
|
||||
debug!("Control Cmd to send : {:02X?}", cmd);
|
||||
|
||||
let cmd_no = (cmd as u32).to_be_bytes();
|
||||
let n: isize = (mem::size_of::<u32>() + msg_len_in) as isize;
|
||||
let n = mem::size_of::<u32>() + msg_len_in;
|
||||
|
||||
let converted_req = msg.ptm_to_request();
|
||||
debug!("converted request: {:02X?}", converted_req);
|
||||
|
||||
let mut buf = Vec::<u8>::with_capacity(n as usize);
|
||||
let mut buf = Vec::<u8>::with_capacity(n);
|
||||
|
||||
buf.extend(cmd_no);
|
||||
buf.extend(converted_req);
|
||||
|
Loading…
x
Reference in New Issue
Block a user