From 9122f81d15f777c996fd26fa52071807886b511e Mon Sep 17 00:00:00 2001 From: Simon Wilkinson Date: Tue, 19 Feb 2013 14:44:14 +0000 Subject: [PATCH] vos: aserver is private The server specified on the command line is used directly to initialise the attributes structure. Move the variable so it's local to the block which uses it, and remove the function-wide initialiser. Caught by clang-analyzer Change-Id: Ia636fae2ed505f6958cefbfbaa72ef7e37edec98 Reviewed-on: http://gerrit.openafs.org/9165 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman --- src/volser/vos.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/volser/vos.c b/src/volser/vos.c index 429fbce..30a35e2 100644 --- a/src/volser/vos.c +++ b/src/volser/vos.c @@ -4476,7 +4476,6 @@ static int ListVLDB(struct cmd_syndesc *as, void *arock) { afs_int32 apart; - afs_uint32 aserver; afs_int32 code; afs_int32 vcode; struct VldbListByAttributes attributes; @@ -4490,7 +4489,6 @@ ListVLDB(struct cmd_syndesc *as, void *arock) int quiet, sort, lock; afs_int32 thisindex, nextindex; - aserver = 0; apart = 0; attributes.Mask = 0; @@ -4517,6 +4515,8 @@ ListVLDB(struct cmd_syndesc *as, void *arock) /* Server specified */ if (as->parms[1].items) { + afs_uint32 aserver; + aserver = GetServer(as->parms[1].items->data); if (aserver == 0) { fprintf(STDERR, "vos: server '%s' not found in host table\n", -- 1.9.4