]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
rx: Remove needless braces
authorSimon Wilkinson <sxw@your-file-system.com>
Fri, 30 Mar 2012 18:39:51 +0000 (19:39 +0100)
committerStephan Wiesand <stephan.wiesand@desy.de>
Wed, 29 Jan 2014 16:59:23 +0000 (08:59 -0800)
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 <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit 5e107724f3661254cfdb693ae2d4d1c5238eba7d)

Change-Id: I99a04d9a2c547e34a3daca6f9e6714f6c7b76b9c
Reviewed-on: http://gerrit.openafs.org/10732
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
src/rx/rx_user.c

index bd3965bafe50f129e1dd9f8bcb8f1e975290339f..54937b484a074fb5a3a8760bca910ccec34faabe 100644 (file)
@@ -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",