From 6d83b33324b68389d0cb8fee73f3bf3a06e9abe5 Mon Sep 17 00:00:00 2001 From: Simon Wilkinson Date: Fri, 30 Mar 2012 19:34:53 +0100 Subject: [PATCH 1/1] viced: Remove pointless braces 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. Change-Id: Iee8c1d60cc2296fefd0e7f82127821dcefb931ec Reviewed-on: http://gerrit.openafs.org/7085 Tested-by: BuildBot Reviewed-by: Derrick Brashear --- src/viced/afsfileprocs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/viced/afsfileprocs.c b/src/viced/afsfileprocs.c index 93b3d71..28a5de0 100644 --- a/src/viced/afsfileprocs.c +++ b/src/viced/afsfileprocs.c @@ -2875,7 +2875,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; @@ -4772,7 +4772,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)); @@ -4881,7 +4881,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)); -- 1.9.4