Unix CM: Purge needless brackets
authorSimon Wilkinson <sxw@your-file-system.com>
Fri, 30 Mar 2012 18:12:37 +0000 (19:12 +0100)
committerDerrick Brashear <shadow@dementix.org>
Sat, 7 Apr 2012 12:06:22 +0000 (05:06 -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: I0f1558b42a487e1de722b77f8423500365a20eee
Reviewed-on: http://gerrit.openafs.org/7074
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>

src/afs/afs_osidnlc.c

index 4ef7be5..1ba66ae 100644 (file)
@@ -421,7 +421,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 */