rx: Remove needless braces
authorSimon Wilkinson <sxw@your-file-system.com>
Fri, 30 Mar 2012 18:39:51 +0000 (19:39 +0100)
committerDerrick Brashear <shadow@dementix.org>
Mon, 9 Apr 2012 01:17:16 +0000 (18:17 -0700)
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 <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

src/rx/rx_user.c

index e54e15d..2cc9c2d 100644 (file)
@@ -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",