From: Jason Ish Date: Mon, 3 Oct 2022 21:32:07 +0000 (-0600) Subject: rust: fix clippy lint for needless_late_init X-Git-Tag: suricata-7.0.0-beta1~94 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c503ca62e2f8f3c30937f5b603c21b131e340996;p=thirdparty%2Fsuricata.git rust: fix clippy lint for needless_late_init --- diff --git a/rust/src/dcerpc/dcerpc.rs b/rust/src/dcerpc/dcerpc.rs index d7e0d904cc..d877494f14 100644 --- a/rust/src/dcerpc/dcerpc.rs +++ b/rust/src/dcerpc/dcerpc.rs @@ -1094,9 +1094,9 @@ fn evaluate_stub_params( input: &[u8], input_len: u16, hdrflags: u8, lenleft: u16, stub_data_buffer: &mut Vec,stub_data_buffer_reset: &mut bool, ) -> u16 { - let stub_len: u16; + let fragtype = hdrflags & (PFC_FIRST_FRAG | PFC_LAST_FRAG); - stub_len = cmp::min(lenleft, input_len); + let stub_len: u16 = cmp::min(lenleft, input_len); if stub_len == 0 { return 0; }