mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
everywhere: misc unnecessary var init/update
These are all cases where we initialise or update a variable, and then never use it. None of them particularly matter, as the compiler should optimise them all away during dead store elimination, but some static analysers complain about them and they are extra work for casual readers to follow, so worth removing. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Alexander Motin <mav@FreeBSD.org> Signed-off-by: Rob Norris <robn@despairlabs.com> Sponsored-by: https://despairlabs.com/sponsor/ Closes #17551
This commit is contained in:
committed by
Brian Behlendorf
parent
d2b9e66b88
commit
bf38c15071
+4
-6
@@ -1974,9 +1974,8 @@ fill_dataset_info(nvlist_t *list, zfs_handle_t *zhp, boolean_t as_int)
|
||||
}
|
||||
|
||||
if (type == ZFS_TYPE_SNAPSHOT) {
|
||||
char *ds, *snap;
|
||||
ds = snap = strdup(zfs_get_name(zhp));
|
||||
ds = strsep(&snap, "@");
|
||||
char *snap = strdup(zfs_get_name(zhp));
|
||||
char *ds = strsep(&snap, "@");
|
||||
fnvlist_add_string(list, "dataset", ds);
|
||||
fnvlist_add_string(list, "snapshot_name", snap);
|
||||
free(ds);
|
||||
@@ -2019,8 +2018,7 @@ get_callback(zfs_handle_t *zhp, void *data)
|
||||
nvlist_t *user_props = zfs_get_user_props(zhp);
|
||||
zprop_list_t *pl = cbp->cb_proplist;
|
||||
nvlist_t *propval;
|
||||
nvlist_t *item, *d, *props;
|
||||
item = d = props = NULL;
|
||||
nvlist_t *item, *d = NULL, *props = NULL;
|
||||
const char *strval;
|
||||
const char *sourceval;
|
||||
boolean_t received = is_recvd_column(cbp);
|
||||
@@ -5879,7 +5877,7 @@ parse_fs_perm_set(fs_perm_set_t *fspset, nvlist_t *nvl)
|
||||
static inline const char *
|
||||
deleg_perm_comment(zfs_deleg_note_t note)
|
||||
{
|
||||
const char *str = "";
|
||||
const char *str;
|
||||
|
||||
/* subcommands */
|
||||
switch (note) {
|
||||
|
||||
Reference in New Issue
Block a user