From: Simon Wilkinson Date: Mon, 25 Feb 2013 10:28:31 +0000 (+0000) Subject: butc: Remove dead initialisation X-Git-Tag: upstream/1.8.0_pre1^2~1422 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=e2f4f60e3e3eb1476eefbff6cb98d6853cddc0df;p=packages%2Fo%2Fopenafs.git butc: Remove dead initialisation The 'bytesread' variable is set by all code paths, so don't bother assigning a default value each time we pass through the loop Caught by clang-analyzer Change-Id: I8b79bc888ba23e2bcfa9befb5bf034db8f3ca3f8 Reviewed-on: http://gerrit.openafs.org/9259 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman --- diff --git a/src/butc/dump.c b/src/butc/dump.c index 5389a4667..c0d96957b 100644 --- a/src/butc/dump.c +++ b/src/butc/dump.c @@ -297,8 +297,6 @@ dumpVolume(struct tc_dumpDesc * curDump, struct dumpRock * dparamsPtr) chunkSize = 0; fragmentvolume = 0; while (!endofvolume && !fragmentvolume) { /*w */ - bytesread = 0; - /* Check for abort in the middle of writing data */ if (volBytesRead >= chunkSize) { chunkSize += BIGCHUNK; @@ -649,8 +647,6 @@ xbsaDumpVolume(struct tc_dumpDesc * curDump, struct dumpRock * dparamsPtr) volBytesRead = 0; chunkSize = 0; while (!endofvolume) { /*w */ - bytesread = 0; - /* Check for abort in the middle of writing data */ if (volBytesRead >= chunkSize) { chunkSize += BIGCHUNK;