Skip to content

Commit

Permalink
nfs: small cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
victorjulien committed Apr 3, 2019
1 parent 884ca0c commit f84667c
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions rust/src/nfs/nfs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1832,9 +1832,7 @@ pub extern "C" fn rs_nfs_probe(direction: libc::uint8_t,
input: *const libc::uint8_t, len: libc::uint32_t)
-> libc::int8_t
{
let slice: &[u8] = unsafe {
std::slice::from_raw_parts(input as *mut u8, len as usize)
};
let slice: &[u8] = build_slice!(input, len as usize);
SCLogDebug!("rs_nfs_probe: running probe");
return nfs_probe(slice, direction);
}
Expand All @@ -1844,9 +1842,7 @@ pub extern "C" fn rs_nfs_probe(direction: libc::uint8_t,
pub extern "C" fn rs_nfs_probe_udp_ts(input: *const libc::uint8_t, len: libc::uint32_t)
-> libc::int8_t
{
let slice: &[u8] = unsafe {
std::slice::from_raw_parts(input as *mut u8, len as usize)
};
let slice: &[u8] = build_slice!(input, len as usize);
return nfs_probe_udp(slice, STREAM_TOSERVER);
}

Expand All @@ -1855,9 +1851,7 @@ pub extern "C" fn rs_nfs_probe_udp_ts(input: *const libc::uint8_t, len: libc::ui
pub extern "C" fn rs_nfs_probe_udp_tc(input: *const libc::uint8_t, len: libc::uint32_t)
-> libc::int8_t
{
let slice: &[u8] = unsafe {
std::slice::from_raw_parts(input as *mut u8, len as usize)
};
let slice: &[u8] = build_slice!(input, len as usize);
return nfs_probe_udp(slice, STREAM_TOCLIENT);
}

Expand Down

0 comments on commit f84667c

Please sign in to comment.