From: Simon Wilkinson Date: Fri, 30 Mar 2012 18:39:51 +0000 (+0100) Subject: rx: Remove needless braces X-Git-Tag: upstream/1.8.0_pre1^2~2604 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=5e107724f3661254cfdb693ae2d4d1c5238eba7d;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. Change-Id: I031db80c3f85c0e4c4db365b1c36b5d4b4a7cb48 Reviewed-on: http://gerrit.openafs.org/7088 Tested-by: Simon Wilkinson Reviewed-by: Derrick Brashear --- diff --git a/src/rx/rx_user.c b/src/rx/rx_user.c index e54e15d73..2cc9c2d14 100644 --- a/src/rx/rx_user.c +++ b/src/rx/rx_user.c @@ -609,7 +609,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",