From: Garrett Wollman Date: Tue, 9 Aug 2011 02:49:24 +0000 (-0400) Subject: vos: eliminate unnecessary global variables X-Git-Tag: upstream/1.8.0_pre1^2~3430 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=9b0f53b2bf61e7532d95391ae553b407a601e814;p=packages%2Fo%2Fopenafs.git vos: eliminate unnecessary global variables tserver is used by three different functions but not shared by them; make it private to each one to improve static analysis. tconn is not used by anything, so just delete it. Change-Id: Ic9fc4add66dbbb02170846154e44d261dcc6b061 Reviewed-on: http://gerrit.openafs.org/5176 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear --- diff --git a/src/volser/vos.c b/src/volser/vos.c index c8bd25143..4559f5933 100644 --- a/src/volser/vos.c +++ b/src/volser/vos.c @@ -86,8 +86,6 @@ cmd_AddParm(ts, "-config", CMD_SINGLE, CMD_OPTIONAL, "config location"); \ } while (0) int rxInitDone = 0; -struct rx_connection *tconn; -afs_uint32 tserver; extern struct ubik_client *cstruct; const char *confdir; @@ -1911,6 +1909,7 @@ CreateVolume(struct cmd_syndesc *as, void *arock) struct nvldbentry entry; afs_int32 vcode; afs_int32 quota; + afs_uint32 tserver; arovolid = &rovolid; @@ -3778,6 +3777,7 @@ SyncVldb(struct cmd_syndesc *as, void *arock) char part[10]; int flags = 0; char *volname = 0; + afs_uint32 tserver; tserver = 0; if (as->parms[0].items) { @@ -3858,6 +3858,7 @@ SyncServer(struct cmd_syndesc *as, void *arock) { afs_int32 pnum, code; /* part name */ char part[10]; + afs_uint32 tserver; int flags = 0;