budb: Don't double initialise iterator
authorSimon Wilkinson <sxw@your-file-system.com>
Sun, 24 Feb 2013 13:02:19 +0000 (13:02 +0000)
committerDerrick Brashear <shadow@your-file-system.com>
Mon, 25 Feb 2013 18:42:39 +0000 (10:42 -0800)
The blockaddr iterator is initialised as part of the for loop.
Don't also initialise it immediately before.

Caught by clang-analyzer

Change-Id: I97e7ced15fe204b3b2d797abbdce8b3f9a2b0c8d
Reviewed-on: http://gerrit.openafs.org/9253
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

src/budb/ol_verify.c

index 2c88717..aeb3cdf 100644 (file)
@@ -1188,7 +1188,6 @@ verifyTextChain(struct ubik_trans *ut, struct textBlock *tbPtr)
 
     for (new = 0; new < 2; new++) {
        size = 0;
-       blockAddr = ntohl(tbPtr->textAddr);
 
        for (blockAddr =
             (new ? ntohl(tbPtr->newTextAddr) : ntohl(tbPtr->textAddr));