1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-21 20:38:45 +00:00
freebsd-ports/security/mhash/files/patch-lib-whirlpool.c
Peter Pentchev c2de38c91d Update to mhash-0.9.9.9.
Add descriptive headers to all the patches.
2009-09-10 11:50:56 +00:00

23 lines
742 B
C

Description: Protect some macro parameters with parentheses.
Author: Peter Pentchev <roam@FreeBSD.org>
Forwarded: http://sourceforge.net/mailarchive/message.php?msg_name=20090910102100.GA26539%40straylight.m.ringlet.net
Last-Update: 2009-09-10
--- lib/whirlpool.c.orig
+++ lib/whirlpool.c
@@ -883,10 +883,10 @@
* Increment the block counter by step
*/
#define INCCTR(cnt,step) do { \
- if ((cnt[3] += (step)) < (step)) \
- if (!(++cnt[2])) \
- if (!(++cnt[1])) \
- if (!(++cnt[0])); \
+ if (((cnt)[3] += (step)) < (step)) \
+ if (!(++(cnt)[2])) \
+ if (!(++(cnt)[1])) \
+ if (!(++(cnt)[0])); \
} while(0);