From 1dd087d0c5dcd072d6af2fc0df87595d2816977f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Niels=20M=C3=B6ller?= Date: Wed, 16 Feb 2011 10:40:45 +0100 Subject: [PATCH] (CBC_ENCRYPT): Avoid using NULL; we don't ensure that it is defined. (CBC_DECRYPT): Likewise. Rev: nettle/cbc.h:1.3 --- cbc.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cbc.h b/cbc.h index 81a05250..8c56699c 100644 --- a/cbc.h +++ b/cbc.h @@ -54,15 +54,16 @@ cbc_decrypt(void *ctx, nettle_crypt_func f, #define CBC_SET_IV(ctx, data) \ memcpy((ctx)->iv, (data), sizeof((ctx)->iv)) +/* NOTE: Avoid using NULL, as we don't include anything defining it. */ #define CBC_ENCRYPT(self, f, length, dst, src) \ -(0 ? ((f)(&(self)->ctx, 0, NULL, NULL)) \ +(0 ? ((f)(&(self)->ctx, 0, (void *)0, (void *)0)) \ : cbc_encrypt((void *) &(self)->ctx, \ (nettle_crypt_func *) (f), \ sizeof((self)->iv), (self)->iv, \ (length), (dst), (src))) #define CBC_DECRYPT(self, f, length, dst, src) \ -(0 ? ((f)(&(self)->ctx, 0, NULL, NULL)) \ +(0 ? ((f)(&(self)->ctx, 0, (void *)0, (void *)0)) \ : cbc_decrypt((void *) &(self)->ctx, \ (nettle_crypt_func *) (f), \ sizeof((self)->iv), (self)->iv, \ -- 2.47.3