From: simon Date: Tue, 31 Jan 2012 18:08:34 +0000 (+0000) Subject: Revert one change from r8928 and instead apply the right answer: X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/agedu/commitdiff_plain/0e005efab7da1a8cbf220ba2bb19c49ab96d9133 Revert one change from r8928 and instead apply the right answer: 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 --- diff --git a/agedu.c b/agedu.c index 00eda2b..9a354f8 100644 --- 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);