]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
FBSD: coalesce three assignments to the same variable
authorGarrett Wollman <wollman@csail.mit.edu>
Fri, 12 Aug 2011 04:39:54 +0000 (00:39 -0400)
committerDerrick Brashear <shadow@your-file-system.com>
Thu, 8 Nov 2012 22:56:38 +0000 (14:56 -0800)
Found-by: clang static analyzer
Reviewed-on: http://gerrit.openafs.org/5233
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit e3148c6bfad25fdcb86b7248bd6b05432502d4ce)

Change-Id: I549bbeb4397d357257497179cd459f6034f93113
Reviewed-on: http://gerrit.openafs.org/8373
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
src/afs/FBSD/osi_misc.c

index 2ece43d5a77bf836de883fa8004f2a66414644ea..04fe165a8fa50398ab6f2275c16609a5e32bf605 100644 (file)
@@ -31,13 +31,11 @@ osi_lookupname(char *aname, enum uio_seg seg, int followlink,
     if (glocked)
        AFS_GUNLOCK();
 
-    flags = 0;
-    flags = LOCKLEAF;
+    flags = LOCKLEAF | MPSAFE; /* namei must take Giant if needed */
     if (followlink)
        flags |= FOLLOW;
     else
        flags |= NOFOLLOW;
-    flags |= MPSAFE; /* namei must take Giant if needed */
     NDINIT(&n, LOOKUP, flags, seg, aname, curthread);
     if ((error = namei(&n)) != 0) {
        if (glocked)