summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortb <>2021-04-06 15:00:19 +0000
committertb <>2021-04-06 15:00:19 +0000
commitab5dc28e98370dff0bfdb128d34cdfd0a13cd669 (patch)
tree960118c7957fb08f43b0cd8c5b7cad033b0a4252
parentc6687d35502cbe2f35c39eb4335a7e5a55d93807 (diff)
downloadopenbsd-ab5dc28e98370dff0bfdb128d34cdfd0a13cd669.tar.gz
openbsd-ab5dc28e98370dff0bfdb128d34cdfd0a13cd669.tar.bz2
openbsd-ab5dc28e98370dff0bfdb128d34cdfd0a13cd669.zip
minor style tweaks
-rw-r--r--src/regress/lib/libcrypto/sm3/sm3test.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/regress/lib/libcrypto/sm3/sm3test.c b/src/regress/lib/libcrypto/sm3/sm3test.c
index 6611372848..f02ce3a667 100644
--- a/src/regress/lib/libcrypto/sm3/sm3test.c
+++ b/src/regress/lib/libcrypto/sm3/sm3test.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sm3test.c,v 1.2 2018/11/12 15:55:59 tb Exp $ */ 1/* $OpenBSD: sm3test.c,v 1.3 2021/04/06 15:00:19 tb Exp $ */
2/* 2/*
3 * Copyright (c) 2018 Ribose Inc 3 * Copyright (c) 2018 Ribose Inc
4 * 4 *
@@ -68,12 +68,13 @@ main(int argc, char *argv[])
68{ 68{
69 EVP_MD_CTX *ctx; 69 EVP_MD_CTX *ctx;
70 uint8_t digest[32]; 70 uint8_t digest[32];
71 int numerrors = 0, i; 71 int i;
72 72 int numerrors = 0;
73
73 if ((ctx = EVP_MD_CTX_new()) == NULL) 74 if ((ctx = EVP_MD_CTX_new()) == NULL)
74 err(1, NULL); 75 err(1, NULL);
75 76
76 for (i = 0; i != SM3_TESTS; ++i) { 77 for (i = 0; i < SM3_TESTS; i++) {
77 if (!EVP_DigestInit(ctx, EVP_sm3())) 78 if (!EVP_DigestInit(ctx, EVP_sm3()))
78 errx(1, "EVP_DigestInit() failed"); 79 errx(1, "EVP_DigestInit() failed");
79 if (!EVP_DigestUpdate(ctx, sm3_input[i], strlen(sm3_input[i]))) 80 if (!EVP_DigestUpdate(ctx, sm3_input[i], strlen(sm3_input[i])))