Skip to content

Commit 701fcd2

Browse files
committed
testing: use one function from ffi crate
1 parent 38d594d commit 701fcd2

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

rust/src/debug.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
2020
use std::{ffi::CString, path::Path};
2121

22-
use suricata_sys::sys::{SCFatalErrorOnInitStatic, SCLogLevel};
22+
use suricata_sys::sys::SCLogLevel;
2323
#[cfg(not(test))]
2424
use suricata_sys::sys::{SCError, SCLogMessage};
2525

@@ -44,11 +44,11 @@ fn basename(filename: &str) -> &str {
4444
return filename;
4545
}
4646

47-
pub fn fatalerror(message: &str) {
48-
unsafe {
49-
SCFatalErrorOnInitStatic(to_safe_cstring(message).as_ptr());
50-
}
51-
}
47+
//pub fn fatalerror(message: &str) {
48+
// unsafe {
49+
// SCFatalErrorOnInitStatic(to_safe_cstring(message).as_ptr());
50+
// }
51+
//}
5252

5353
pub fn sclog(level: SCLogLevel, file: &str, line: u32, function: &str, message: &str) {
5454
let filename = basename(file);
@@ -199,7 +199,7 @@ macro_rules! SCLogDebug {
199199
#[macro_export]
200200
macro_rules!SCFatalErrorOnInit {
201201
($($arg:tt)*) => {
202-
$crate::debug::fatalerror(&format!($($arg)*));
202+
suricata_ffi::debug::fatalerror(&format!($($arg)*));
203203
}
204204
}
205205

0 commit comments

Comments
 (0)