mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
Enable -Wwrite-strings
Also, fix leak from ztest_global_vars_to_zdb_args() Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #13348
This commit is contained in:
@@ -68,7 +68,7 @@ zfs_allocatable_devs(nvlist_t *nv)
|
||||
* Are there special vdevs?
|
||||
*/
|
||||
boolean_t
|
||||
zfs_special_devs(nvlist_t *nv, char *type)
|
||||
zfs_special_devs(nvlist_t *nv, const char *type)
|
||||
{
|
||||
char *bias;
|
||||
uint_t c;
|
||||
@@ -84,11 +84,9 @@ zfs_special_devs(nvlist_t *nv, char *type)
|
||||
&bias) == 0) {
|
||||
if (strcmp(bias, VDEV_ALLOC_BIAS_SPECIAL) == 0 ||
|
||||
strcmp(bias, VDEV_ALLOC_BIAS_DEDUP) == 0) {
|
||||
if (type != NULL && strcmp(bias, type) == 0) {
|
||||
if (type == NULL ||
|
||||
(type != NULL && strcmp(bias, type) == 0))
|
||||
return (B_TRUE);
|
||||
} else if (type == NULL) {
|
||||
return (B_TRUE);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user