summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjsing <>2023-07-08 07:52:25 +0000
committerjsing <>2023-07-08 07:52:25 +0000
commit4eb1c2dc65dce42bad9e9a153aae65df2c10d7fa (patch)
tree8369d981f52f0d8ab659d40e0d4929e6f78296f7 /src
parent1ae7ea109349aaa24cb71b5782db07ca2ba4670b (diff)
downloadopenbsd-4eb1c2dc65dce42bad9e9a153aae65df2c10d7fa.tar.gz
openbsd-4eb1c2dc65dce42bad9e9a153aae65df2c10d7fa.tar.bz2
openbsd-4eb1c2dc65dce42bad9e9a153aae65df2c10d7fa.zip
Remove now unnecessary "do { } while (0)"
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/sha/sha1.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/lib/libcrypto/sha/sha1.c b/src/lib/libcrypto/sha/sha1.c
index a0ec259f7e..c4a280121c 100644
--- a/src/lib/libcrypto/sha/sha1.c
+++ b/src/lib/libcrypto/sha/sha1.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sha1.c,v 1.8 2023/07/08 07:49:45 jsing Exp $ */ 1/* $OpenBSD: sha1.c,v 1.9 2023/07/08 07:52:25 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -494,6 +494,7 @@ int
494SHA1_Final(unsigned char *md, SHA_CTX *c) 494SHA1_Final(unsigned char *md, SHA_CTX *c)
495{ 495{
496 unsigned char *p = (unsigned char *)c->data; 496 unsigned char *p = (unsigned char *)c->data;
497 unsigned long ll;
497 size_t n = c->num; 498 size_t n = c->num;
498 499
499 p[n] = 0x80; /* there is always room for one */ 500 p[n] = 0x80; /* there is always room for one */
@@ -519,8 +520,6 @@ SHA1_Final(unsigned char *md, SHA_CTX *c)
519 c->num = 0; 520 c->num = 0;
520 memset(p, 0, SHA_CBLOCK); 521 memset(p, 0, SHA_CBLOCK);
521 522
522 do {
523 unsigned long ll;
524 ll = c->h0; 523 ll = c->h0;
525 HOST_l2c(ll, md); 524 HOST_l2c(ll, md);
526 ll = c->h1; 525 ll = c->h1;
@@ -531,7 +530,6 @@ SHA1_Final(unsigned char *md, SHA_CTX *c)
531 HOST_l2c(ll, md); 530 HOST_l2c(ll, md);
532 ll = c->h4; 531 ll = c->h4;
533 HOST_l2c(ll, md); 532 HOST_l2c(ll, md);
534 } while (0);
535 533
536 return 1; 534 return 1;
537} 535}