]> git.ipfire.org Git - thirdparty/nettle.git/commitdiff
ocb: Delete unneeded zero checks.
authorNiels Möller <nisse@lysator.liu.se>
Sat, 14 May 2022 20:34:14 +0000 (22:34 +0200)
committerNiels Möller <nisse@lysator.liu.se>
Mon, 6 Feb 2023 19:20:01 +0000 (20:20 +0100)
ocb.c

diff --git a/ocb.c b/ocb.c
index 880c11a400d92c4f221c38f66bb169b788f46a24..37f821f79e85a9bb06e209b2fa2cb732671e6d0a 100644 (file)
--- a/ocb.c
+++ b/ocb.c
@@ -150,9 +150,6 @@ ocb_update (struct ocb_ctx *ctx, const struct ocb_key *key,
            const void *cipher, nettle_cipher_func *f,
            size_t length, const uint8_t *data)
 {
-  if (data == 0)
-    return;
-
   assert (ctx->message_count == 0);
 
   if (ctx->data_count == 0)
@@ -184,9 +181,6 @@ ocb_encrypt (struct ocb_ctx *ctx, const struct ocb_key *key,
             const void *cipher, nettle_cipher_func *f,
             size_t length, uint8_t *dst, const uint8_t *src)
 {
-  if (length == 0)
-    return;
-
   if (ctx->message_count == 0)
     ctx->offset = ctx->initial;
 
@@ -222,9 +216,6 @@ ocb_decrypt (struct ocb_ctx *ctx, const struct ocb_key *key,
             const void *decrypt_ctx, nettle_cipher_func *decrypt,
             size_t length, uint8_t *dst, const uint8_t *src)
 {
-  if (length == 0)
-    return;
-
   if (ctx->message_count == 0)
     ctx->offset = ctx->initial;