Skip to content

Commit 60e57a9

Browse files
committed
Fix types
1 parent e989d9c commit 60e57a9

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

ledger_device_sdk/src/io.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ impl Comm {
407407
G_ux_params.u.pairing_request.pairing_info_len = (_len - 2) as u32;
408408
for i in 0..G_ux_params.u.pairing_request.pairing_info_len as usize {
409409
G_ux_params.u.pairing_request.pairing_info[i as usize] =
410-
seph_buffer[5 + i] as u8;
410+
seph_buffer[5 + i] as core::ffi::c_char;
411411
}
412412
G_ux_params.u.pairing_request.pairing_info
413413
[G_ux_params.u.pairing_request.pairing_info_len as usize] = 0;

ledger_device_sdk/src/libcall/swap.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,8 @@ pub fn get_check_address_params<
155155

156156
debug_print("==> GET_REF_ADDRESS\n");
157157
let mut address_length = 0usize;
158-
let mut c = unsafe { *(params.address_to_check.add(address_length)) };
159-
while c != '\0' as u8 && address_length < ADDRESS_BUF_SIZE {
158+
let mut c: core::ffi::c_char = unsafe { *(params.address_to_check.add(address_length)) };
159+
while c != '\0' as core::ffi::c_char && address_length < ADDRESS_BUF_SIZE {
160160
check_address_params.ref_address[address_length] = c as u8;
161161
address_length += 1;
162162
c = unsafe { *(params.address_to_check.add(address_length)) };
@@ -224,7 +224,7 @@ pub fn get_printable_amount_params<
224224
debug_print("==> GET_AMOUNT_STR\n");
225225
printable_amount_params.amount_str = unsafe {
226226
&(*(libarg.__bindgen_anon_1.get_printable_amount as *mut get_printable_amount_parameters_t))
227-
.printable_amount as *const u8 as *mut i8
227+
.printable_amount as *const core::ffi::c_char as *mut i8
228228
};
229229

230230
printable_amount_params
@@ -285,7 +285,7 @@ pub fn sign_tx_params<const COIN_CONFIG_BUF_SIZE: usize, const ADDRESS_BUF_SIZE:
285285
debug_print("==> GET_DESTINATION_ADDRESS\n");
286286
let mut dest_address_length = 0usize;
287287
let mut c = unsafe { *params.destination_address.add(dest_address_length) };
288-
while c != '\0' as u8 && dest_address_length < ADDRESS_BUF_SIZE {
288+
while c != '\0' as ::core::ffi::c_char && dest_address_length < ADDRESS_BUF_SIZE {
289289
create_tx_params.dest_address[dest_address_length] = c as u8;
290290
dest_address_length += 1;
291291
c = unsafe { *params.destination_address.add(dest_address_length) };

0 commit comments

Comments
 (0)