diff --git a/md5.c b/md5.c index 9b92ae52..1172e0a7 100644 --- a/md5.c +++ b/md5.c @@ -157,14 +157,14 @@ void iputils_MD5Final(unsigned char digest[IPUTILS_MD5LENGTH], /* The four core functions - F1 is optimized somewhat */ /* #define F1(x, y, z) (x & y | ~x & z) */ -# define F1(x, y, z) (z ^ (x & (y ^ z))) +# define F1(x, y, z) ((z) ^ ((x) & ((y) ^ (z)))) # define F2(x, y, z) F1(z, x, y) -# define F3(x, y, z) (x ^ y ^ z) -# define F4(x, y, z) (y ^ (x | ~z)) +# define F3(x, y, z) ((x) ^ (y) ^ (z)) +# define F4(x, y, z) ((y) ^ ((x) | ~(z))) /* This is the central step in the MD5 algorithm. */ # define MD5STEP(f, w, x, y, z, data, s) \ - ( w += f(x, y, z) + data, w = w<>(32-s), w += x ) + ( (w) += f(x, y, z) + (data), (w) = (w)<<(s) | (w)>>(32-(s)), (w) += (x) ) /* * The core of the MD5 algorithm, this alters an existing MD5 hash to reflect diff --git a/ping/node_info.c b/ping/node_info.c index 789ca45d..f86847a0 100644 --- a/ping/node_info.c +++ b/ping/node_info.c @@ -46,11 +46,11 @@ struct niquery_option { #define NIQUERY_OPTION(_name, _has_arg, _data, _handler) \ { \ - .name = _name, \ + .name = (_name), \ .namelen = sizeof(_name) - 1, \ - .has_arg = _has_arg, \ - .data = _data, \ - .handler = _handler \ + .has_arg = (_has_arg), \ + .data = (_data), \ + .handler = (_handler) \ } static int niquery_option_name_handler(struct ping_ni *ni, int index __attribute__((__unused__)), const char *arg __attribute__((__unused__)));