From 92011f4e93209319b0ef41a962aefff40e4938e1 Mon Sep 17 00:00:00 2001 From: Simon Wilkinson Date: Sun, 24 Feb 2013 13:05:13 +0000 Subject: [PATCH] volser: Remove redundant success flag In UV_RestoreVolume2, there is a success flag whose only use is ... success = 0 [ ... ] success = 1 if (success) { [ ... ] } It's pointless, so just remove it, and one clang warning Caught by clang-analyzer Change-Id: I7d57531c4dfb8955b813d534ad3b72b182fdbc76 Reviewed-on: http://gerrit.openafs.org/9255 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear --- src/volser/vsprocs.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/volser/vsprocs.c b/src/volser/vsprocs.c index 333bbfa84..a5147b032 100644 --- a/src/volser/vsprocs.c +++ b/src/volser/vsprocs.c @@ -4543,7 +4543,6 @@ UV_RestoreVolume2(afs_uint32 toserver, afs_int32 topart, afs_uint32 tovolid, char tovolreal[VOLSER_OLDMAXVOLNAME]; afs_uint32 pvolid; afs_int32 temptid, pparentid; - int success; struct nvldbentry entry, storeEntry; afs_int32 error; int islocked; @@ -4557,7 +4556,6 @@ UV_RestoreVolume2(afs_uint32 toserver, afs_int32 topart, afs_uint32 tovolid, memset(&cookie, 0, sizeof(cookie)); islocked = 0; - success = 0; error = 0; reuseID = 1; tocall = (struct rx_call *)0; @@ -4757,10 +4755,9 @@ UV_RestoreVolume2(afs_uint32 toserver, afs_int32 topart, afs_uint32 tovolid, goto refail; } - success = 1; fprintf(STDOUT, " done\n"); fflush(STDOUT); - if (success && (!reuseID || (flags & RV_FULLRST))) { + if (!reuseID || (flags & RV_FULLRST)) { /* Volume was restored on the file server, update the * VLDB to reflect the change. */ -- 2.39.5