From 63a5b026c700ac1fe870b841de91db1b581f5ba8 Mon Sep 17 00:00:00 2001 From: Ryan Moeller Date: Mon, 13 Sep 2021 14:51:02 +0000 Subject: [PATCH] libzfs_sendrecv: Fix some comment style nits * Capitalize and punctuate complete sentences. * Add a blank line between functions. Reviewed-by: Brian Behlendorf Signed-off-by: Ryan Moeller Closes #12967 --- lib/libzfs/libzfs_sendrecv.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/libzfs/libzfs_sendrecv.c b/lib/libzfs/libzfs_sendrecv.c index f96f1aa9332a..e034b4378991 100644 --- a/lib/libzfs/libzfs_sendrecv.c +++ b/lib/libzfs/libzfs_sendrecv.c @@ -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); @@ -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) { @@ -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 || @@ -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); @@ -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) {