summaryrefslogtreecommitdiff
path: root/lib/libcrypto/sha
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2023-03-29 05:11:38 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2023-03-29 05:11:38 +0000
commit8e97803358dedbaccc206bb276e67238c18421af (patch)
tree3b2fd74359927b14714d9008c8906ee67d3db3bc /lib/libcrypto/sha
parenta7fba69fcf19ff00dac276210ec3abe2db9e90b3 (diff)
Use multiple statements instead of a statement with multiple expressions.
No change in generated assembly.
Diffstat (limited to 'lib/libcrypto/sha')
-rw-r--r--lib/libcrypto/sha/sha512.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/libcrypto/sha/sha512.c b/lib/libcrypto/sha/sha512.c
index 042badecd59..5dfe61b4a5f 100644
--- a/lib/libcrypto/sha/sha512.c
+++ b/lib/libcrypto/sha/sha512.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sha512.c,v 1.22 2023/03/27 10:27:12 jsing Exp $ */
+/* $OpenBSD: sha512.c,v 1.23 2023/03/29 05:11:37 jsing Exp $ */
/* ====================================================================
* Copyright (c) 1998-2011 The OpenSSL Project. All rights reserved.
*
@@ -535,9 +535,10 @@ void
SHA512_Transform(SHA512_CTX *c, const unsigned char *data)
{
#ifndef SHA512_BLOCK_CAN_MANAGE_UNALIGNED_DATA
- if ((size_t)data % sizeof(c->u.d[0]) != 0)
- memcpy(c->u.p, data, sizeof(c->u.p)),
- data = c->u.p;
+ if ((size_t)data % sizeof(c->u.d[0]) != 0) {
+ memcpy(c->u.p, data, sizeof(c->u.p));
+ data = c->u.p;
+ }
#endif
sha512_block_data_order(c, data, 1);
}