Revert one change from r8928 and instead apply the right answer:
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Tue, 31 Jan 2012 18:08:34 +0000 (18:08 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Tue, 31 Jan 2012 18:08:34 +0000 (18:08 +0000)
instead of initialising prevtf to NULL before the loop in which I
rebase it, I should take out the rebase statement completely since
it's overwritten immediately afterwards!

Spotted by clang-analyzer.

git-svn-id: svn://svn.tartarus.org/sgt/agedu@9394 cda61777-01e9-0310-a592-d414129be87e

agedu.c

diff --git a/agedu.c b/agedu.c
index 00eda2b..9a354f8 100644 (file)
--- a/agedu.c
+++ b/agedu.c
@@ -1143,7 +1143,6 @@ int main(int argc, char **argv)
                prevbuf[0] = '\0';
                tf = triewalk_next(tw, buf);
                assert(tf);
-               prevtf = NULL;         /* placate lint */
                while (1) {
                    int i;
 
@@ -1178,9 +1177,6 @@ int main(int argc, char **argv)
                        triewalk_rebase(tw, mappedfile);
                        diff = (const unsigned char *)mappedfile -
                            (const unsigned char *)oldfile;
-                       if (prevtf)
-                           prevtf = (const struct trie_file *)
-                               (((const unsigned char *)prevtf) + diff);
                        if (tf)
                            tf = (const struct trie_file *)
                                (((const unsigned char *)tf) + diff);