From: Simon Wilkinson Date: Sun, 24 Feb 2013 10:48:14 +0000 (+0000) Subject: bucoord: Remove dead initialisation X-Git-Tag: upstream/1.8.0_pre1^2~1431 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=9894b0ded9212e96308fc7df44005c513e8e6672;p=packages%2Fo%2Fopenafs.git bucoord: Remove dead initialisation offset is simply used as a copy of nextOffset for the GetText function call. We don't need to initialise it to 0 at the start of the loop (and arguably, as it is passed to the function by value, we could just remove the copy entirely) Caught by clang-analyzer Change-Id: I137ea3ba1ff44d94b90287d9735db69d6ff8717d Reviewed-on: http://gerrit.openafs.org/9249 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: BuildBot --- diff --git a/src/bucoord/ubik_db_if.c b/src/bucoord/ubik_db_if.c index 33c9b4e93..fae12866d 100644 --- a/src/bucoord/ubik_db_if.c +++ b/src/bucoord/ubik_db_if.c @@ -495,7 +495,6 @@ bcdb_GetTextFile(udbClientTextP ctPtr) ERROR(BUDB_INTERNALERROR); charList.charListT_len = bufferSize; - offset = 0; nextOffset = 0; ctPtr->textSize = 0; while (nextOffset != -1) {