Skip to content

Commit c112368

Browse files
aidenfoxiveyk0kubun
authored andcommitted
ZJIT: Use std::ptr::null instead of casts
1 parent 5c4d76c commit c112368

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

zjit/src/backend/tests.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,8 @@ fn test_c_call()
197197
#[test]
198198
fn test_alloc_ccall_regs() {
199199
let mut asm = Assembler::new();
200-
let out1 = asm.ccall(0 as *const u8, vec![]);
201-
let out2 = asm.ccall(0 as *const u8, vec![out1]);
200+
let out1 = asm.ccall(std::ptr::null::<u8>(), vec![]);
201+
let out2 = asm.ccall(std::ptr::null::<u8>(), vec![out1]);
202202
asm.mov(EC, out2);
203203
let mut cb = CodeBlock::new_dummy();
204204
asm.compile_with_regs(&mut cb, Assembler::get_alloc_regs()).unwrap();

0 commit comments

Comments
 (0)