From db444d2063df6c574882d9263e885c4fe1134133 Mon Sep 17 00:00:00 2001 From: weili Date: Thu, 2 Jun 2016 15:48:15 -0700 Subject: Fix all the code which has duplicate variable declarations When there are duplicate variable declarations, the inner names shadow the outter ones. This is error prone and harder to read. Remove all the instances found by /analyze. BUG=chromium:613623, chromium:427616 Review-Url: https://codereview.chromium.org/2027273002 --- xfa/fxfa/parser/xfa_document_serialize.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'xfa/fxfa/parser/xfa_document_serialize.cpp') diff --git a/xfa/fxfa/parser/xfa_document_serialize.cpp b/xfa/fxfa/parser/xfa_document_serialize.cpp index 497c8216dd..d7b8bf04d9 100644 --- a/xfa/fxfa/parser/xfa_document_serialize.cpp +++ b/xfa/fxfa/parser/xfa_document_serialize.cpp @@ -336,13 +336,12 @@ static void XFA_DataExporter_RegenerateFormFile_Changed( pNode->GetClassID() == XFA_ELEMENT_Items) { wsChildren.clear(); bSaveXML = TRUE; - CXFA_Node* pChildNode = pNode->GetNodeItem(XFA_NODEITEM_FirstChild); - while (pChildNode) { - XFA_DataExporter_RegenerateFormFile_Changed(pChildNode, newBuf, - bSaveXML); + CXFA_Node* pChild = pNode->GetNodeItem(XFA_NODEITEM_FirstChild); + while (pChild) { + XFA_DataExporter_RegenerateFormFile_Changed(pChild, newBuf, bSaveXML); wsChildren += newBuf.AsStringC(); newBuf.Clear(); - pChildNode = pChildNode->GetNodeItem(XFA_NODEITEM_NextSibling); + pChild = pChild->GetNodeItem(XFA_NODEITEM_NextSibling); } } break; -- cgit v1.2.3