diff mbox series

[16/20] libfsverity_sign_digest() use ARRAY_SIZE()

Message ID 20200424205504.2586682-17-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>
---
 libverity.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/libverity.c b/libverity.c
index 975d86e..7908dcd 100644
--- a/libverity.c
+++ b/libverity.c
@@ -521,8 +521,7 @@  libfsverity_sign_digest(const struct libfsverity_digest *digest,
 	if (!sig_params->keyfile || !sig_params->certfile)
 		return -EINVAL;
 
-	for (i = 0; i < sizeof(sig_params->reserved) /
-		     sizeof(sig_params->reserved[0]); i++) {
+	for (i = 0; i < ARRAY_SIZE(sig_params->reserved); i++) {
 		if (sig_params->reserved[i])
 			return -EINVAL;
 	}