From 3e7680e45b79ed1e371ad7a22c30dd9ca8041f8b Mon Sep 17 00:00:00 2001 From: David Nadlinger Date: Mon, 14 Nov 2022 22:50:38 +0000 Subject: [PATCH] firmware/rpc_proto: Remove unnecessary cast [nfc] --- artiq/firmware/libproto_artiq/rpc_proto.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/artiq/firmware/libproto_artiq/rpc_proto.rs b/artiq/firmware/libproto_artiq/rpc_proto.rs index 6b0a914a8..85fc902ba 100644 --- a/artiq/firmware/libproto_artiq/rpc_proto.rs +++ b/artiq/firmware/libproto_artiq/rpc_proto.rs @@ -147,7 +147,7 @@ unsafe fn recv_value(reader: &mut R, tag: Tag, data: &mut *mut (), let storage_offset = round_up(list_size, tag.alignment()); let storage_size = tag.size() * length; - let allocation = alloc(storage_offset as usize + storage_size)? as *mut u8; + let allocation = alloc(storage_offset + storage_size)? as *mut u8; *ptr_to_list = allocation as *mut List; let storage = allocation.offset(storage_offset as isize) as *mut ();