]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
rust: fix clippy lint for needless_late_init
authorJason Ish <jason.ish@oisf.net>
Mon, 3 Oct 2022 21:32:07 +0000 (15:32 -0600)
committerVictor Julien <vjulien@oisf.net>
Tue, 4 Oct 2022 09:22:02 +0000 (11:22 +0200)
rust/src/dcerpc/dcerpc.rs

index d7e0d904cc85e7930ecb60bac92b530188f084b3..d877494f14b146e343c0a9cf72df595a8454b073 100644 (file)
@@ -1094,9 +1094,9 @@ fn evaluate_stub_params(
     input: &[u8], input_len: u16, hdrflags: u8, lenleft: u16,
     stub_data_buffer: &mut Vec<u8>,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;
     }