]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
viced: Remove pointless braces
authorSimon Wilkinson <sxw@your-file-system.com>
Fri, 30 Mar 2012 18:34:53 +0000 (19:34 +0100)
committerStephan Wiesand <stephan.wiesand@desy.de>
Wed, 12 Feb 2014 16:52:05 +0000 (08:52 -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 viced to make clang happy.

Reviewed-on: http://gerrit.openafs.org/7085
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit 6d83b33324b68389d0cb8fee73f3bf3a06e9abe5)

Change-Id: Ied4eb404108e7d8384cc394d5f5e65a04beb17dc
Reviewed-on: http://gerrit.openafs.org/10747
Reviewed-by: D Brashear <shadow@your-file-system.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
src/viced/afsfileprocs.c

index d831bd79d792d474fd6d04c943017481dc14b938..36cbfbdc3a6c47a35f2f2a1001ffd9b0212853f6 100644 (file)
@@ -3201,7 +3201,7 @@ common_StoreData64(struct rx_call *acall, struct AFSFid *Fid,
     /* set volume synchronization information */
     SetVolumeSync(Sync, volptr);
 
-    if ((targetptr->disk.type == vSymlink)) {
+    if (targetptr->disk.type == vSymlink) {
        /* Should we return a better error code here??? */
        errorCode = EISDIR;
        goto Bad_StoreData;
@@ -5509,7 +5509,7 @@ SAFSS_ExtendLock(struct rx_call *acall, struct AFSFid *Fid,
     (void)PutVolumePackage(acall, parentwhentargetnotdir, targetptr,
                           (Vnode *) 0, volptr, &client);
 
-    if ((errorCode == VREADONLY))      /* presumably, we already granted this lock */
+    if (errorCode == VREADONLY)        /* presumably, we already granted this lock */
        errorCode = 0;          /* under our generous policy re RO vols */
 
     ViceLog(2, ("SAFS_ExtendLock returns %d\n", errorCode));
@@ -5646,7 +5646,7 @@ SAFSS_ReleaseLock(struct rx_call *acall, struct AFSFid *Fid,
     (void)PutVolumePackage(acall, parentwhentargetnotdir, targetptr,
                           (Vnode *) 0, volptr, &client);
 
-    if ((errorCode == VREADONLY))      /* presumably, we already granted this lock */
+    if (errorCode == VREADONLY)        /* presumably, we already granted this lock */
        errorCode = 0;          /* under our generous policy re RO vols */
 
     ViceLog(2, ("SAFS_ReleaseLock returns %d\n", errorCode));