mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-24 03:08:51 +03:00
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
This commit is contained in:
+2
-2
@@ -224,7 +224,7 @@ vdev_dbgmsg_print_tree(vdev_t *vd, int indent)
|
||||
* Virtual device management.
|
||||
*/
|
||||
|
||||
static const vdev_ops_t *const vdev_ops_table[] = {
|
||||
static vdev_ops_t *const vdev_ops_table[] = {
|
||||
&vdev_root_ops,
|
||||
&vdev_raidz_ops,
|
||||
&vdev_draid_ops,
|
||||
@@ -246,7 +246,7 @@ static const vdev_ops_t *const vdev_ops_table[] = {
|
||||
static vdev_ops_t *
|
||||
vdev_getops(const char *type)
|
||||
{
|
||||
const vdev_ops_t *ops, *const *opspp;
|
||||
vdev_ops_t *ops, *const *opspp;
|
||||
|
||||
for (opspp = vdev_ops_table; (ops = *opspp) != NULL; opspp++)
|
||||
if (strcmp(ops->vdev_op_type, type) == 0)
|
||||
|
||||
Reference in New Issue
Block a user