HomeFreeBSD

Fix double const qualifier declarations

Description

Fix double const qualifier declarations

Some header files define structures like this one:

typedef const struct zio_checksum_info {
/* ... */
const char *ci_name;
} zio_abd_checksum_func_t;

So we can use zio_abd_checksum_func_t for const declarations now.
It's not needed that we use the const qualifier again like this:
const zio_abd_checksum_func_t *varname;

This patch solves the double const qualifiers, which were found by
smatch.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Signed-off-by: Tino Reichardt <milky-zfs@mcmilk.de>
Closes #13961

Details

Provenance
Tino Reichardt <milky-zfs@mcmilk.de>Authored on Sep 30 2022, 10:34 PM
GitHub <noreply@github.com>Committed on Sep 30 2022, 10:34 PM
Parents
rG55d7afa4adbb: Reduce false positives from Static Analyzers
Branches
Unknown
Tags
Unknown

Event Timeline

GitHub <noreply@github.com> committed rGa2d5643f88ce: Fix double const qualifier declarations (authored by Tino Reichardt <milky-zfs@mcmilk.de>).Sep 30 2022, 10:34 PM