butc: Remove dead initialisation
authorSimon Wilkinson <sxw@your-file-system.com>
Mon, 25 Feb 2013 10:28:31 +0000 (10:28 +0000)
committerJeffrey Altman <jaltman@your-file-system.com>
Mon, 25 Feb 2013 21:28:46 +0000 (13:28 -0800)
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 <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

src/butc/dump.c

index 5389a46..c0d9695 100644 (file)
@@ -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;