volser: Fix a couple of assigned but not read errors
authorSimon Wilkinson <sxw@your-file-system.com>
Wed, 20 Feb 2013 11:18:28 +0000 (11:18 +0000)
committerJeffrey Altman <jaltman@your-file-system.com>
Sun, 24 Feb 2013 19:22:24 +0000 (11:22 -0800)
Fix a couple more errors where we assign to a variable, but never
read the result back out.

Caught by clang-analyzer

Change-Id: I78f8f1403d166c4231b0abdb607de77e9ed62a27
Reviewed-on: http://gerrit.openafs.org/9201
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

src/volser/vsprocs.c

index 39e50eb..ca88c67 100644 (file)
@@ -1513,7 +1513,7 @@ UV_MoveVolume2(afs_uint32 afromvol, afs_uint32 afromserver, afs_int32 afrompart,
     pntg = 1;
     toconn = UV_Bind(atoserver, AFSCONF_VOLUMEPORT);   /* get connections to the servers */
     fromconn = UV_Bind(afromserver, AFSCONF_VOLUMEPORT);
-    fromtid = totid = 0;       /* initialize to uncreated */
+    totid = 0; /* initialize to uncreated */
 
     /* ***
      * clone the read/write volume locally.
@@ -2084,7 +2084,6 @@ UV_MoveVolume2(afs_uint32 afromvol, afs_uint32 afromserver, afs_int32 afrompart,
        ubik_VL_ReleaseLock(cstruct, 0, afromvol, -1,
                            (LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP));
        VDONE;
-       islocked = 0;
     }
   done:                        /* routine cleanup */
     if (volName)