From: Niels Möller Date: Wed, 16 Feb 2011 09:40:45 +0000 (+0100) Subject: (CBC_ENCRYPT): Avoid using NULL; we don't ensure that it X-Git-Tag: nettle_2.2_release_20110711~121 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1dd087d0c5dcd072d6af2fc0df87595d2816977f;p=thirdparty%2Fnettle.git (CBC_ENCRYPT): Avoid using NULL; we don't ensure that it is defined. (CBC_DECRYPT): Likewise. Rev: nettle/cbc.h:1.3 --- 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, \