From: Niels Möller Date: Wed, 20 Feb 2013 10:22:00 +0000 (+0100) Subject: Fixed TMP_ALLOC, was missing parentheses. X-Git-Tag: nettle_2.7_release_20130424~109^2~29 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aaf431459847561bc8df7e31bfb62fe95cfc3382;p=thirdparty%2Fnettle.git Fixed TMP_ALLOC, was missing parentheses. --- diff --git a/ChangeLog b/ChangeLog index df9f6485..fa11ddc4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2013-02-20 Niels Möller + + * nettle-internal.h (TMP_ALLOC): Added missing parentheses. + 2013-02-18 Niels Möller * testsuite/ecdsa-verify-test.c: New testcase. diff --git a/nettle-internal.h b/nettle-internal.h index e85e3c5f..3b7f771d 100644 --- a/nettle-internal.h +++ b/nettle-internal.h @@ -36,11 +36,11 @@ #if HAVE_ALLOCA # define TMP_DECL(name, type, max) type *name -# define TMP_ALLOC(name, size) (name = alloca(sizeof (*name) * size)) +# define TMP_ALLOC(name, size) (name = alloca(sizeof (*name) * (size))) #else /* !HAVE_ALLOCA */ # define TMP_DECL(name, type, max) type name[max] # define TMP_ALLOC(name, size) \ -do { if (size > (sizeof(name) / sizeof(name[0]))) abort(); } while (0) + do { if ((size) > (sizeof(name) / sizeof(name[0]))) abort(); } while (0) #endif /* Arbitrary limits which apply to systems that don't have alloca */