]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
vol: Remove unneeded braces
authorSimon Wilkinson <sxw@your-file-system.com>
Fri, 30 Mar 2012 18:30:18 +0000 (19:30 +0100)
committerStephan Wiesand <stephan.wiesand@desy.de>
Wed, 29 Jan 2014 17:06:05 +0000 (09:06 -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 vol to make clang happy.

Reviewed-on: http://gerrit.openafs.org/7082
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit 58be19d792e6b8e93fbd49bc4ef04bbb8f4560ef)

Change-Id: Ie2fd97927eace8a9317598c1b44d2c2610cdc31a
Reviewed-on: http://gerrit.openafs.org/10739
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
src/vol/volume.c

index b76344a1d3e2023c1750b636706315851b863271..f88c6fbbde0ff88d4bd880a4343425b7c8cbd192 100644 (file)
@@ -8342,7 +8342,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;
        }
     }