Skip to content

Commit

Permalink
libzfs_sendrecv: Fix some comment style nits
Browse files Browse the repository at this point in the history
* Capitalize and punctuate complete sentences.
* Add a blank line between functions.

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ryan Moeller <[email protected]>
Closes openzfs#12967
  • Loading branch information
Ryan Moeller authored and nicman23 committed Aug 22, 2022
1 parent 00e3cc8 commit d214c46
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/libzfs/libzfs_sendrecv.c
Original file line number Diff line number Diff line change
Expand Up @@ -1402,7 +1402,7 @@ zfs_send_resume_token_to_nvlist(libzfs_handle_t *hdl, const char *token)
return (NULL);
}

/* convert hexadecimal representation to binary */
/* Convert hexadecimal representation to binary. */
token = strrchr(token, '-') + 1;
int len = strlen(token) / 2;
unsigned char *compressed = zfs_alloc(hdl, len);
Expand All @@ -1417,7 +1417,7 @@ zfs_send_resume_token_to_nvlist(libzfs_handle_t *hdl, const char *token)
}
}

/* verify checksum */
/* Verify checksum. */
zio_cksum_t cksum;
fletcher_4_native_varsize(compressed, len, &cksum);
if (cksum.zc_word[0] != checksum) {
Expand All @@ -1427,7 +1427,7 @@ zfs_send_resume_token_to_nvlist(libzfs_handle_t *hdl, const char *token)
return (NULL);
}

/* uncompress */
/* Uncompress. */
void *packed = zfs_alloc(hdl, packed_len);
uLongf packed_len_long = packed_len;
if (uncompress(packed, &packed_len_long, compressed, len) != Z_OK ||
Expand All @@ -1439,7 +1439,7 @@ zfs_send_resume_token_to_nvlist(libzfs_handle_t *hdl, const char *token)
return (NULL);
}

/* unpack nvlist */
/* Unpack nvlist. */
nvlist_t *nv;
int error = nvlist_unpack(packed, packed_len, &nv, KM_SLEEP);
free(packed);
Expand All @@ -1451,6 +1451,7 @@ zfs_send_resume_token_to_nvlist(libzfs_handle_t *hdl, const char *token)
}
return (nv);
}

static enum lzc_send_flags
lzc_flags_from_sendflags(const sendflags_t *flags)
{
Expand Down

0 comments on commit d214c46

Please sign in to comment.