From 37a3417f23b16a828485de496e495eb71f03fd1e Mon Sep 17 00:00:00 2001 From: Simon Wilkinson Date: Tue, 19 Feb 2013 14:59:10 +0000 Subject: [PATCH] volser: Remove needless initialisation Remove a number of places where we initialise a variable to NULL immediately before we assign a real value to it. Caught by clang-analyzer Change-Id: I74ece8f3a82a5c768d769b74b4ccce12195fc216 Reviewed-on: http://gerrit.openafs.org/9169 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman --- src/volser/volprocs.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/volser/volprocs.c b/src/volser/volprocs.c index 13c2fc247..2fed208b3 100644 --- a/src/volser/volprocs.c +++ b/src/volser/volprocs.c @@ -721,7 +721,6 @@ VolClone(struct rx_call *acid, afs_int32 atrans, VolumeId purgeId, callerAddress(acid, buffer), newName); } error = 0; - originalvp = (Volume *) 0; purgevp = (Volume *) 0; newvp = (Volume *) 0; tt = ttc = (struct volser_trans *)0; @@ -907,7 +906,6 @@ VolReClone(struct rx_call *acid, afs_int32 atrans, VolumeId cloneId) } error = 0; clonevp = originalvp = (Volume *) 0; - tt = (struct volser_trans *)0; tt = FindTrans(atrans); if (!tt) @@ -1269,9 +1267,6 @@ VolForward(struct rx_call *acid, afs_int32 fromTrans, afs_int32 fromDate, if (!afsconf_SuperUser(tdir, acid, caller)) return VOLSERBAD_ACCESS; /*not a super user */ - /* initialize things */ - tcon = (struct rx_connection *)0; - tt = (struct volser_trans *)0; /* find the local transaction */ tt = FindTrans(fromTrans); @@ -2975,10 +2970,8 @@ SAFSVolConvertROtoRWvolume(struct rx_call *acid, afs_int32 partId, } } - if (ttc) { + if (ttc) DeleteTrans(ttc, 1); - ttc = (struct volser_trans *)0; - } closedir(dirp); return ret; -- 2.39.5