@@ -451,14 +451,14 @@ mod test {
451
451
#[ test]
452
452
fn test_c_confirm_callback ( ) {
453
453
let ret = confirm_callback (
454
- "" . as_ptr ( ) as * const std:: os:: raw:: c_char ,
454
+ "\0 " . as_ptr ( ) as * const std:: os:: raw:: c_char ,
455
455
& mut 1u32 as * mut _ as * mut std:: os:: raw:: c_void ,
456
456
) ;
457
457
assert_eq ! ( 1 , ret) ;
458
458
assert_eq ! ( Bool :: Yes , Bool :: from( ret) ) ;
459
459
460
460
let ret = confirm_callback (
461
- "" . as_ptr ( ) as * const std:: os:: raw:: c_char ,
461
+ "\0 " . as_ptr ( ) as * const std:: os:: raw:: c_char ,
462
462
& mut 0u32 as * mut _ as * mut std:: os:: raw:: c_void ,
463
463
) ;
464
464
assert_eq ! ( 0 , ret) ;
@@ -469,13 +469,13 @@ mod test {
469
469
fn test_c_logging_callback ( ) {
470
470
logging_callback (
471
471
libcryptsetup_rs_sys:: CRYPT_LOG_ERROR as i32 ,
472
- "" . as_ptr ( ) as * const std:: os:: raw:: c_char ,
472
+ "\0 " . as_ptr ( ) as * const std:: os:: raw:: c_char ,
473
473
& mut 1u32 as * mut _ as * mut std:: os:: raw:: c_void ,
474
474
) ;
475
475
476
476
logging_callback (
477
477
libcryptsetup_rs_sys:: CRYPT_LOG_DEBUG as i32 ,
478
- "" . as_ptr ( ) as * const std:: os:: raw:: c_char ,
478
+ "\0 " . as_ptr ( ) as * const std:: os:: raw:: c_char ,
479
479
& mut 0u32 as * mut _ as * mut std:: os:: raw:: c_void ,
480
480
) ;
481
481
}
0 commit comments