]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
rust/clippy: fix lint: nonminimal_bool
authorJason Ish <jason.ish@oisf.net>
Mon, 28 Nov 2022 22:33:38 +0000 (16:33 -0600)
committerVictor Julien <vjulien@oisf.net>
Tue, 6 Dec 2022 13:10:11 +0000 (14:10 +0100)
rust/src/lib.rs
rust/src/smb/smb2.rs

index ba68d009cf36699bcf0ca5677008e9a9e5c8464a..53b078dd5a6285cb17272abb909b5e3882b64ce6 100644 (file)
@@ -36,7 +36,6 @@
 #![allow(clippy::module_inception)]
 #![allow(clippy::never_loop)]
 #![allow(clippy::new_without_default)]
-#![allow(clippy::nonminimal_bool)]
 #![allow(clippy::redundant_pattern_matching)]
 #![allow(clippy::result_unit_err)]
 #![allow(clippy::type_complexity)]
index ac02201cf6f5a3e02299fa9fbdfc247a16d75096..0c1daba6d71896eb3b20f4a70839e54c639b3666 100644 (file)
@@ -188,7 +188,7 @@ pub fn smb2_read_response_record<'b>(state: &mut SMBState, r: &Smb2Record<'b>)
                     Some(n) => (n.name.to_vec(), n.is_pipe),
                     _ => { (Vec::new(), false) },
                 };
-                let mut is_dcerpc = if is_pipe || (share_name.is_empty() && !is_pipe) {
+                let mut is_dcerpc = if is_pipe || share_name.is_empty() {
                     state.get_service_for_guid(&file_guid).1
                 } else {
                     false
@@ -327,7 +327,7 @@ pub fn smb2_write_request_record<'b>(state: &mut SMBState, r: &Smb2Record<'b>)
                     Some(n) => { (n.name.to_vec(), n.is_pipe) },
                     _ => { (Vec::new(), false) },
                 };
-                let mut is_dcerpc = if is_pipe || (share_name.is_empty() && !is_pipe) {
+                let mut is_dcerpc = if is_pipe || share_name.is_empty() {
                     state.get_service_for_guid(wr.guid).1
                 } else {
                     false