From: Simon Wilkinson Date: Wed, 20 Feb 2013 11:17:41 +0000 (+0000) Subject: volser: Don't assign code when we don't care X-Git-Tag: upstream/1.8.0_pre1^2~1455 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=1b2a0e9fa78da65e9d9f56fe1cac514465fc14d2;p=packages%2Fo%2Fopenafs.git volser: Don't assign code when we don't care 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 Tested-by: BuildBot Reviewed-by: Jeffrey Altman --- diff --git a/src/volser/vsprocs.c b/src/volser/vsprocs.c index f3ff75271..39e50eb3e 100644 --- a/src/volser/vsprocs.c +++ b/src/volser/vsprocs.c @@ -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) {