From: Simon Wilkinson Date: Fri, 30 Mar 2012 18:12:37 +0000 (+0100) Subject: Unix CM: Purge needless brackets X-Git-Tag: upstream/1.8.0_pre1^2~2626 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=345656ec140f0156f2076629bdfc84940c02160b;p=packages%2Fo%2Fopenafs.git Unix CM: Purge needless brackets 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 Tested-by: Derrick Brashear --- diff --git a/src/afs/afs_osidnlc.c b/src/afs/afs_osidnlc.c index 4ef7be509..1ba66ae3d 100644 --- a/src/afs/afs_osidnlc.c +++ b/src/afs/afs_osidnlc.c @@ -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 */