From: Simon Wilkinson Date: Sun, 24 Feb 2013 10:42:00 +0000 (+0000) Subject: volser: Remove dead assignment X-Git-Tag: openafs-stable-1_8_0pre1~1434 X-Git-Url: https://git.openafs.org/?p=openafs.git;a=commitdiff_plain;h=ca6d6bb9b06b54728ebe2c84e7b7d0ea1067aaa9 volser: Remove dead assignment Don't initialise code immediately before we assign a real value to it various UV_ functions Caught by clang-analyzer Change-Id: I91d9300715d44fafd73b1a61be548589468e3209 Reviewed-on: http://gerrit.openafs.org/9246 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: BuildBot --- diff --git a/src/volser/vsprocs.c b/src/volser/vsprocs.c index ca88c67..333bbfa 100644 --- a/src/volser/vsprocs.c +++ b/src/volser/vsprocs.c @@ -5531,7 +5531,6 @@ UV_XListVolumes(afs_uint32 a_serverID, afs_int32 a_partID, int a_all, * We set the val field to a null pointer as a hint for the stub to * allocate space. */ - code = 0; *a_numEntsInResultP = 0; *a_resultPP = (volintXInfo *) 0; volumeXInfo.volXEntries_val = (volintXInfo *) 0; @@ -5573,8 +5572,6 @@ UV_ListOneVolume(afs_uint32 aserver, afs_int32 apart, afs_uint32 volid, afs_int32 code = 0; volEntries volumeInfo; - code = 0; - *resultPtr = (volintInfo *) 0; volumeInfo.volEntries_val = (volintInfo *) 0; /*this hints the stub to allocate space */ volumeInfo.volEntries_len = 0; @@ -5637,7 +5634,6 @@ UV_XListOneVolume(afs_uint32 a_serverID, afs_int32 a_partID, afs_uint32 a_volID, * the info. Setting the val field to a null pointer tells the stub * to allocate space for us. */ - code = 0; *a_resultPP = (volintXInfo *) 0; volumeXInfo.volXEntries_val = (volintXInfo *) 0; volumeXInfo.volXEntries_len = 0;