From: Simon Wilkinson Date: Tue, 19 Feb 2013 14:59:10 +0000 (+0000) Subject: volser: Remove needless initialisation X-Git-Tag: openafs-stable-1_8_0pre1~1506 X-Git-Url: https://git.openafs.org/?p=openafs.git;a=commitdiff_plain;h=37a3417f23b16a828485de496e495eb71f03fd1e 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 --- diff --git a/src/volser/volprocs.c b/src/volser/volprocs.c index 13c2fc2..2fed208 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;