[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [libmicrohttpd] 01/03: sha256.c: convert to Yoda conditions
From: |
gnunet |
Subject: |
[GNUnet-SVN] [libmicrohttpd] 01/03: sha256.c: convert to Yoda conditions |
Date: |
Fri, 19 Apr 2019 21:36:30 +0200 |
This is an automated email from the git hooks/post-receive script.
karlson2k pushed a commit to branch master
in repository libmicrohttpd.
commit 9998ca76905bb3b922c147281e13f4718bf72fe3
Author: Evgeny Grin (Karlson2k) <address@hidden>
AuthorDate: Fri Apr 19 12:27:43 2019 +0300
sha256.c: convert to Yoda conditions
---
src/microhttpd/sha256.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/microhttpd/sha256.c b/src/microhttpd/sha256.c
index e3989d57..801f920b 100644
--- a/src/microhttpd/sha256.c
+++ b/src/microhttpd/sha256.c
@@ -258,7 +258,7 @@ sha256_update (void *ctx_,
bytes_have = (unsigned)(ctx->count & (SHA256_BLOCK_SIZE-1));
ctx->count += length;
- if (bytes_have)
+ if (0 != bytes_have)
{
unsigned bytes_left = SHA256_BLOCK_SIZE - bytes_have;
if (length >= bytes_left)
@@ -274,7 +274,7 @@ sha256_update (void *ctx_,
}
}
- while (length >= SHA256_BLOCK_SIZE)
+ while (SHA256_BLOCK_SIZE <= length)
{ /* Process any full blocks of new data directly,
without copying to buffer. */
sha256_transform (ctx->H, data);
@@ -282,7 +282,7 @@ sha256_update (void *ctx_,
length -= SHA256_BLOCK_SIZE;
}
- if (length != 0)
+ if (0 != length)
{ /* Copy incomplete block of new data (if any)
to buffer. */
memcpy (ctx->buffer + bytes_have, data, length);
--
To stop receiving notification emails like this one, please contact
address@hidden