From: Simon Wilkinson Date: Fri, 30 Mar 2012 18:39:51 +0000 (+0100) Subject: rx: Remove needless braces X-Git-Tag: upstream/1.6.8^2~81 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=27f32e81e4fb8bf7219d732fc9bb053234ba4290;p=packages%2Fo%2Fopenafs.git rx: Remove needless braces Doing if ((a==b)) is unecessary. It's also potentially dangerous, as that's the syntax required to do assignment within an if statement. clang now issues warnings (errors in -Werror mode) when it encounters these. Remove pointless braces from the Unix CM to make clang happy. Reviewed-on: http://gerrit.openafs.org/7088 Tested-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry picked from commit 5e107724f3661254cfdb693ae2d4d1c5238eba7d) Change-Id: I99a04d9a2c547e34a3daca6f9e6714f6c7b76b9c Reviewed-on: http://gerrit.openafs.org/10732 Tested-by: BuildBot Reviewed-by: Perry Ruiter Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Reviewed-by: Stephan Wiesand --- diff --git a/src/rx/rx_user.c b/src/rx/rx_user.c index bd3965baf..54937b484 100644 --- a/src/rx/rx_user.c +++ b/src/rx/rx_user.c @@ -622,7 +622,7 @@ rx_GetIFInfo(void) fudge_netmask(rxi_NetAddrs[rxi_numNetAddrs]); #ifdef SIOCGIFNETMASK res = ioctl(s, SIOCGIFNETMASK, ifr); - if ((res == 0)) { + if (res == 0) { a = (struct sockaddr_in *)&ifr->ifr_addr; myNetMasks[rxi_numNetAddrs] = ntohl(a->sin_addr.s_addr); /* fprintf(stderr, "if %s subnetmask=0x%x\n",