]> git.ipfire.org Git - thirdparty/nettle.git/commitdiff
(CBC_ENCRYPT): Avoid using NULL; we don't ensure that it
authorNiels Möller <nisse@lysator.liu.se>
Wed, 16 Feb 2011 09:40:45 +0000 (10:40 +0100)
committerNiels Möller <nisse@lysator.liu.se>
Wed, 16 Feb 2011 09:40:45 +0000 (10:40 +0100)
is defined.
(CBC_DECRYPT): Likewise.

Rev: nettle/cbc.h:1.3

cbc.h

diff --git a/cbc.h b/cbc.h
index 81a052503a782eefcfdb4d5724786ce30ea40dcd..8c56699ca0f2726a94b212e9d9394eede4c5e9cf 100644 (file)
--- 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,        \