]> git.proxmox.com Git - mirror_zfs.git/commitdiff
libzfs_sendrecv: Simplify out guid temporary
authorRyan Moeller <freqlabs@FreeBSD.org>
Tue, 27 Jul 2021 13:46:35 +0000 (13:46 +0000)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 2 Feb 2022 01:01:48 +0000 (17:01 -0800)
De-clutter the clode and make it clear the guid is only used here.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ryan Moeller <freqlabs@FreeBSD.org>
Closes #12967

lib/libzfs/libzfs_sendrecv.c

index 50008f3ddff852b79fce4a1f24074a5fc078778f..2af310d2c9a558cc824bd32bf82694db478e9296 100644 (file)
@@ -191,16 +191,14 @@ fsavl_create(nvlist_t *fss)
                while ((snapelem =
                    nvlist_next_nvpair(snaps, snapelem)) != NULL) {
                        fsavl_node_t *fn;
-                       uint64_t guid;
 
-                       guid = fnvpair_value_uint64(snapelem);
                        if ((fn = malloc(sizeof (fsavl_node_t))) == NULL) {
                                fsavl_destroy(fsavl);
                                return (NULL);
                        }
                        fn->fn_nvfs = nvfs;
                        fn->fn_snapname = nvpair_name(snapelem);
-                       fn->fn_guid = guid;
+                       fn->fn_guid = fnvpair_value_uint64(snapelem);
 
                        /*
                         * Note: if there are multiple snaps with the