From 1b2a0e9fa78da65e9d9f56fe1cac514465fc14d2 Mon Sep 17 00:00:00 2001 From: Simon Wilkinson Date: Wed, 20 Feb 2013 11:17:41 +0000 Subject: [PATCH] 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 --- src/volser/vsprocs.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/volser/vsprocs.c b/src/volser/vsprocs.c index f3ff752..39e50eb 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) { -- 1.9.4