libzfs_sendrecv: Simplify out guid temporary

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
This commit is contained in:
Ryan Moeller 2021-07-27 13:46:35 +00:00 committed by Brian Behlendorf
parent 01a0039ac9
commit 1488e822f2
1 changed files with 1 additions and 3 deletions

View File

@ -191,16 +191,14 @@ fsavl_create(nvlist_t *fss)
while ((snapelem = while ((snapelem =
nvlist_next_nvpair(snaps, snapelem)) != NULL) { nvlist_next_nvpair(snaps, snapelem)) != NULL) {
fsavl_node_t *fn; fsavl_node_t *fn;
uint64_t guid;
guid = fnvpair_value_uint64(snapelem);
if ((fn = malloc(sizeof (fsavl_node_t))) == NULL) { if ((fn = malloc(sizeof (fsavl_node_t))) == NULL) {
fsavl_destroy(fsavl); fsavl_destroy(fsavl);
return (NULL); return (NULL);
} }
fn->fn_nvfs = nvfs; fn->fn_nvfs = nvfs;
fn->fn_snapname = nvpair_name(snapelem); 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 * Note: if there are multiple snaps with the