vol: Remove unneeded braces
authorSimon Wilkinson <sxw@your-file-system.com>
Fri, 30 Mar 2012 18:30:18 +0000 (19:30 +0100)
committerDerrick Brashear <shadow@dementix.org>
Sun, 8 Apr 2012 01:29:51 +0000 (18:29 -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 vol to make clang happy.

Change-Id: I805c52fd76de4d028741ae4382b747917581d2f2
Reviewed-on: http://gerrit.openafs.org/7082
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>

src/vol/volume.c

index 5a1d5e1..d846092 100644 (file)
@@ -8493,7 +8493,7 @@ VLookupVolume_r(Error * ec, VolId volumeId, Volume * hint)
     /* search the chain for this volume id */
     for(queue_Scan(head, vp, np, Volume)) {
        looks++;
-       if ((vp->hashid == volumeId)) {
+       if (vp->hashid == volumeId) {
            break;
        }
     }