]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
smb: fix rustc 1.42 warnings
authorVictor Julien <victor@inliniac.net>
Tue, 17 Mar 2020 19:44:33 +0000 (20:44 +0100)
committerVictor Julien <victor@inliniac.net>
Tue, 17 Mar 2020 19:44:33 +0000 (20:44 +0100)
rust/src/smb/detect.rs
rust/src/smb/smb.rs

index c5029d8d0b656e7fdf52ff45e60931e3f9b7e9a0..58d65c32241ade002649e9bf7019112e4b96e711 100644 (file)
@@ -151,16 +151,16 @@ fn match_version(op: u8, them: u16, us: u16) -> bool {
             true
         },
         1 => { // LT
-            (them < us)
+            them < us
         },
         2 => { // GT
-            (them > us)
+            them > us
         },
         3 => { // EQ
-            (them == us)
+            them == us
         },
         4 => { // NE
-            (them != us)
+            them != us
         },
         _ => {
             panic!("called with invalid op {}", op);
index 2939108dd512d63083f950c18913936b8f3f0f20..0200bf0105527e8f3c58c054cb71088b8e15203c 100644 (file)
@@ -705,8 +705,8 @@ impl SMBCommonHdr {
 
     // don't include tree id
     pub fn compare(&self, hdr: &SMBCommonHdr) -> bool {
-        (self.rec_type == hdr.rec_type && self.ssn_id == hdr.ssn_id &&
-         self.msg_id == hdr.msg_id)
+        self.rec_type == hdr.rec_type && self.ssn_id == hdr.ssn_id &&
+            self.msg_id == hdr.msg_id
     }
 }