]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Unix CM: Purge needless brackets
authorSimon Wilkinson <sxw@your-file-system.com>
Fri, 30 Mar 2012 18:12:37 +0000 (19:12 +0100)
committerStephan Wiesand <stephan.wiesand@desy.de>
Wed, 29 Jan 2014 17:08:36 +0000 (09:08 -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/7074
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit 345656ec140f0156f2076629bdfc84940c02160b)

Change-Id: I6a47d30fd6ef0ad0c6903c79a0bfe579db527847
Reviewed-on: http://gerrit.openafs.org/10743
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
src/afs/afs_osidnlc.c

index 6deb89c294ff8bb681c1359d05c33beb27a7bb91..9df2b0dea5a24be11898278c72bd10cfebb357d1 100644 (file)
@@ -456,7 +456,7 @@ osi_dnlc_purgevp(struct vcache *avc)
     writelocked = (0 == NBObtainWriteLock(&afs_xdnlc, 3));
 
     for (i = 0; i < NCSIZE; i++) {
-       if ((nameCache[i].vp == avc)) {
+       if (nameCache[i].vp == avc) {
            nameCache[i].dirp = nameCache[i].vp = NULL;
            /* can't simply break; because of hard links -- might be two */
            /* different entries with same vnode */