From: Victor Julien Date: Tue, 17 Mar 2020 19:44:33 +0000 (+0100) Subject: smb: fix rustc 1.42 warnings X-Git-Tag: suricata-5.0.3~71 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8af7637915bfa427dc650d46661260c3bd721b54;p=thirdparty%2Fsuricata.git smb: fix rustc 1.42 warnings (cherry picked from commit a729d266c398d0d3a9f43d7df3f351245d1773e3) --- diff --git a/rust/src/smb/detect.rs b/rust/src/smb/detect.rs index c5029d8d0b..58d65c3224 100644 --- a/rust/src/smb/detect.rs +++ b/rust/src/smb/detect.rs @@ -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); diff --git a/rust/src/smb/smb.rs b/rust/src/smb/smb.rs index 2939108dd5..0200bf0105 100644 --- a/rust/src/smb/smb.rs +++ b/rust/src/smb/smb.rs @@ -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 } }