]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
volser: Don't assign code when we don't care
authorSimon Wilkinson <sxw@your-file-system.com>
Wed, 20 Feb 2013 11:17:41 +0000 (11:17 +0000)
committerJeffrey Altman <jaltman@your-file-system.com>
Sun, 24 Feb 2013 19:21:25 +0000 (11:21 -0800)
When we're cleaning up temporary volumes, we don't care whether
it succeeds or not. Don't assign code to the results of these
volume deletions, only to then discard it.

Caught by clang-analyzer

Change-Id: I81583cc82e78db38de8aad92c7c7d0c2f44eb33d
Reviewed-on: http://gerrit.openafs.org/9200
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 f3ff75271ea73dd867a04b516376b17cb34c1031..39e50eb3e8cfa45122d24f1e6d720f11d3178c0e 100644 (file)
@@ -2023,8 +2023,8 @@ UV_MoveVolume2(afs_uint32 afromvol, afs_uint32 afromserver, afs_int32 afrompart,
        }
 
        if (volid && toconn)
-           code = DoVolDelete(toconn, volid, atopart,
-                              "destination", 0, NULL, "Recovery:");
+           DoVolDelete(toconn, volid, atopart,
+                       "destination", 0, NULL, "Recovery:");
 
        /* put source volume on-line */
        if (fromconn) {
@@ -2063,20 +2063,19 @@ UV_MoveVolume2(afs_uint32 afromvol, afs_uint32 afromserver, afs_int32 afrompart,
 
        /* delete backup volume */
        if (fromconn) {
-           code = DoVolDelete(fromconn, backupId, afrompart,
-                              "backup", 0, NULL, "Recovery:");
+           DoVolDelete(fromconn, backupId, afrompart,
+                       "backup", 0, NULL, "Recovery:");
 
-           code = DoVolDelete(fromconn, afromvol, afrompart, "source",
-                              (atoserver != afromserver)?atoserver:0,
-                              NULL, NULL);
+           DoVolDelete(fromconn, afromvol, afrompart, "source",
+                       (atoserver != afromserver)?atoserver:0,
+                       NULL, NULL);
        }
     }
 
     /* common cleanup - delete local clone */
-    if (newVol) {
-       code = DoVolDelete(fromconn, newVol, afrompart,
-                          "clone", 0, NULL, "Recovery:");
-    }
+    if (newVol)
+       DoVolDelete(fromconn, newVol, afrompart,
+                   "clone", 0, NULL, "Recovery:");
 
     /* unlock VLDB entry */
     if (islocked) {