Project

General

Profile

Actions

Optimization #5577

closed
JI JI

Optimization #4591: Fix Rust clippy lints

Fix warning about "comparing with null" in debug code

Optimization #5577: Fix warning about "comparing with null" in debug code

Added by Jason Ish over 3 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Effort:
Difficulty:
Label:
Beginner, Good First Issue, Outreachy, Rust

Description

We are working on cleaning our Rust code from lint warnings.

For resolving this issue, please check the rust code and fix warnings related to
"comparing with null is better expressed by the `.is_null()` method".

For more details on this warning, check
https://rust-lang.github.io/rust-clippy/master/index.html#cmp_null

For example:

cargo clippy --all-features

Will result in warnings like:
warning: comparing with null is better expressed by the `.is_null()` method
   --> src/ike/detect.rs:142:28
    |
142 |     debug_validate_bug_on!(value == std::ptr::null_mut());
    |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_null


Related issues 1 (0 open1 closed)

Copied from Suricata - Optimization #4595: Fix warning about "comparing with null"ClosedSam MohammadActions

JI Updated by Jason Ish over 3 years ago Actions #1

JI Updated by Jason Ish over 3 years ago Actions #2

  • Assignee changed from OISF Dev to Jason Ish

SB Updated by Shivani Bhardwaj over 3 years ago Actions #3

  • Status changed from New to Closed
  • Target version changed from TBD to 7.0.0-beta1
Actions

Also available in: PDF Atom