From 46a53191c1ad11a41c948594e972568e62d155b4 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 6 Jun 2012 13:58:20 +0000 Subject: minor code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@332 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/modules/xml/xmlParser.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/modules/xml') diff --git a/src/modules/xml/xmlParser.cpp b/src/modules/xml/xmlParser.cpp index fdcd644be0..a3e070496e 100644 --- a/src/modules/xml/xmlParser.cpp +++ b/src/modules/xml/xmlParser.cpp @@ -1140,7 +1140,7 @@ int XMLNode::removeOrderElement(XMLNodeData *d, XMLElementType t, int index) int n=d->nChild+d->nText+d->nClear, *o=d->pOrder,i=findPosition(d,index,t); memmove(o+i, o+i+1, (n-i)*sizeof(int)); for (;ipOrder=(int)realloc(d->pOrder,n*sizeof(int)); // but we skip reallocation because it's too time consuming. @@ -1166,7 +1166,7 @@ void *XMLNode::addToOrder(int memoryIncrease,int *_pos, int nc, void *p, int siz if (pos==n) { *_pos=nc; o[n]=(int)((nc<<2)+xtype); return p; } o[i]=o[pos]; - for (i=pos+1;i<=n;i++) if ((o[i]&3)==(int)xtype) o[i]+=4; + for (i=pos+1;i<=n;i++) if ((o[i]&3) == (int)xtype) o[i]+=4; *_pos=pos=o[pos]>>2; memmove(((char*)p)+(pos+1)*size,((char*)p)+pos*size,(nc-pos)*size); @@ -1356,7 +1356,7 @@ int XMLNode::ParseXMLElement(void *pa) } // Iterate through the tokens in the document - for(;;) + for (;;) { // Obtain the next token token = GetNextToken(pXML, &cbToken, &xtype); @@ -2213,7 +2213,7 @@ void XMLNode::emptyTheNode(char force) if (d->pParent) detachFromParent(d); int i; XMLNode *pc; - for(i=0; inChild; i++) + for (i=0; inChild; i++) { pc=dd->pChild+i; pc->d->pParent=NULL; @@ -2221,11 +2221,11 @@ void XMLNode::emptyTheNode(char force) pc->emptyTheNode(force); } myFree(dd->pChild); - for(i=0; inText; i++) free((void*)dd->pText[i]); + for (i=0; inText; i++) free((void*)dd->pText[i]); myFree(dd->pText); - for(i=0; inClear; i++) free((void*)dd->pClear[i].lpszValue); + for (i=0; inClear; i++) free((void*)dd->pClear[i].lpszValue); myFree(dd->pClear); - for(i=0; inAttribute; i++) + for (i=0; inAttribute; i++) { free((void*)dd->pAttribute[i].lpszName); if (dd->pAttribute[i].lpszValue) free((void*)dd->pAttribute[i].lpszValue); @@ -2905,7 +2905,7 @@ XMLSTR XMLParserBase64Tool::encode(unsigned char *inbuf, unsigned int inlen, cha int i=encodeLength(inlen,formatted),k=17,eLen=inlen/3,j; alloc(i*sizeof(XMLCHAR)); XMLSTR curr=(XMLSTR)buf; - for(i=0;i