diff mbox series

[17/20] fsverity_cmd_sign() use sizeof() input argument instead of struct

Message ID 20200424205504.2586682-18-Jes.Sorensen@gmail.com (mailing list archive)
State Superseded
Headers show
Series Split fsverity-utils into a shared library | expand

Commit Message

Jes Sorensen April 24, 2020, 8:55 p.m. UTC
From: Jes Sorensen <jsorensen@fb.com>

Signed-off-by: Jes Sorensen <jsorensen@fb.com>
---
 cmd_sign.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/cmd_sign.c b/cmd_sign.c
index 57a9250..d699d85 100644
--- a/cmd_sign.c
+++ b/cmd_sign.c
@@ -147,7 +147,7 @@  int fsverity_cmd_sign(const struct fsverity_command *cmd,
 		goto out_err;
 	}
 
-	memset(&params, 0, sizeof(struct libfsverity_merkle_tree_params));
+	memset(&params, 0, sizeof(params));
 	params.version = 1;
 	params.hash_algorithm = alg_nr;
 	params.block_size = block_size;
@@ -162,7 +162,7 @@  int fsverity_cmd_sign(const struct fsverity_command *cmd,
 
 	digest_size = libfsverity_digest_size(alg_nr);
 
-	memset(&sig_params, 0, sizeof(struct libfsverity_signature_params));
+	memset(&sig_params, 0, sizeof(sig_params));
 	sig_params.keyfile = keyfile;
 	sig_params.certfile = certfile;
 	if (libfsverity_sign_digest(digest, &sig_params, &sig, &sig_size)) {