1 Description: Protect some macro parameters with parentheses.
2 Author: Peter Pentchev <roam@FreeBSD.org>
3 Forwarded: http://sourceforge.net/mailarchive/message.php?msg_name=20090910102100.GA26539%40straylight.m.ringlet.net
4 Last-Update: 2009-09-10
5 
6 --- lib/gosthash.c.orig
7 +++ lib/gosthash.c
8 @@ -273,22 +273,22 @@
9   */
10 
11  #define GOST_ENCRYPT(key) \
12 -GOST_ENCRYPT_ROUND(key[0], key[1]) \
13 -GOST_ENCRYPT_ROUND(key[2], key[3]) \
14 -GOST_ENCRYPT_ROUND(key[4], key[5]) \
15 -GOST_ENCRYPT_ROUND(key[6], key[7]) \
16 -GOST_ENCRYPT_ROUND(key[0], key[1]) \
17 -GOST_ENCRYPT_ROUND(key[2], key[3]) \
18 -GOST_ENCRYPT_ROUND(key[4], key[5]) \
19 -GOST_ENCRYPT_ROUND(key[6], key[7]) \
20 -GOST_ENCRYPT_ROUND(key[0], key[1]) \
21 -GOST_ENCRYPT_ROUND(key[2], key[3]) \
22 -GOST_ENCRYPT_ROUND(key[4], key[5]) \
23 -GOST_ENCRYPT_ROUND(key[6], key[7]) \
24 -GOST_ENCRYPT_ROUND(key[7], key[6]) \
25 -GOST_ENCRYPT_ROUND(key[5], key[4]) \
26 -GOST_ENCRYPT_ROUND(key[3], key[2]) \
27 -GOST_ENCRYPT_ROUND(key[1], key[0]) \
28 +GOST_ENCRYPT_ROUND((key)[0], (key)[1]) \
29 +GOST_ENCRYPT_ROUND((key)[2], (key)[3]) \
30 +GOST_ENCRYPT_ROUND((key)[4], (key)[5]) \
31 +GOST_ENCRYPT_ROUND((key)[6], (key)[7]) \
32 +GOST_ENCRYPT_ROUND((key)[0], (key)[1]) \
33 +GOST_ENCRYPT_ROUND((key)[2], (key)[3]) \
34 +GOST_ENCRYPT_ROUND((key)[4], (key)[5]) \
35 +GOST_ENCRYPT_ROUND((key)[6], (key)[7]) \
36 +GOST_ENCRYPT_ROUND((key)[0], (key)[1]) \
37 +GOST_ENCRYPT_ROUND((key)[2], (key)[3]) \
38 +GOST_ENCRYPT_ROUND((key)[4], (key)[5]) \
39 +GOST_ENCRYPT_ROUND((key)[6], (key)[7]) \
40 +GOST_ENCRYPT_ROUND((key)[7], (key)[6]) \
41 +GOST_ENCRYPT_ROUND((key)[5], (key)[4]) \
42 +GOST_ENCRYPT_ROUND((key)[3], (key)[2]) \
43 +GOST_ENCRYPT_ROUND((key)[1], (key)[0]) \
44  t = r; \
45  r = l; \
46  l = t;
47