[cig-commits] r4050 - in long/3D/Gale/trunk/src/StGermain: .
Base/IO/src
walter at geodynamics.org
walter at geodynamics.org
Thu Jul 20 20:05:33 PDT 2006
Author: walter
Date: 2006-07-20 20:05:33 -0700 (Thu, 20 Jul 2006)
New Revision: 4050
Modified:
long/3D/Gale/trunk/src/StGermain/
long/3D/Gale/trunk/src/StGermain/Base/IO/src/XML_IO_Handler.c
Log:
r2534 at earth: boo | 2006-07-20 20:01:41 -0700
r2510 at earth (orig r3678): AlanLo | 2006-07-13 20:29:00 -0700
code fix: code inside assert statement
remember people! assert is a macro and not a function. if NDEBUG is defined code inside it will disappear!
Its only for evaluating conditions.
Property changes on: long/3D/Gale/trunk/src/StGermain
___________________________________________________________________
Name: svk:merge
- 1ef209d2-b310-0410-a72d-e20c9eb0015c:/cig:2533
afb6c753-b9d0-0310-b4e7-dbd8d91cdd35:/trunk/StGermain:3677
+ 1ef209d2-b310-0410-a72d-e20c9eb0015c:/cig:2534
afb6c753-b9d0-0310-b4e7-dbd8d91cdd35:/trunk/StGermain:3678
Modified: long/3D/Gale/trunk/src/StGermain/Base/IO/src/XML_IO_Handler.c
===================================================================
--- long/3D/Gale/trunk/src/StGermain/Base/IO/src/XML_IO_Handler.c 2006-07-21 03:05:06 UTC (rev 4049)
+++ long/3D/Gale/trunk/src/StGermain/Base/IO/src/XML_IO_Handler.c 2006-07-21 03:05:33 UTC (rev 4050)
@@ -1452,7 +1452,8 @@
}
strcpy( correctNameSpace, currNsInfo->location );
strcat( correctNameSpace, currNsInfo->version );
- assert( self->currNameSpace = xmlNewNs( rootNode, (xmlChar*) correctNameSpace, NULL ) );
+ self->currNameSpace = xmlNewNs( rootNode, (xmlChar*) correctNameSpace, NULL );
+ assert( self->currNameSpace );
xmlSetNs( rootNode, self->currNameSpace );
xmlDocSetRootElement( self->currDoc, rootNode );
@@ -1515,9 +1516,11 @@
#endif
Journal_Printf(stream, "_XML_IO_Handler_WriteEntryToFile called to write dictionary entry %s to file %s.\n", name, filename );
/* if overwrite/new */
- assert( self->currDoc = xmlNewDoc( XML_VERSION ) );
+ self->currDoc = xmlNewDoc( XML_VERSION );
+ assert( self->currDoc );
/* create root element */
- assert( rootNode = xmlNewNode( NULL, ROOT_NODE_NAME) );
+ rootNode = xmlNewNode( NULL, ROOT_NODE_NAME);
+ assert( rootNode );
if ( !(correctNameSpace = Memory_Alloc_Array( char, correctLength, "correctNameSpace" )) ) {
Journal_Printf(
@@ -1527,7 +1530,8 @@
}
strcpy( correctNameSpace, currNsInfo->location );
strcat( correctNameSpace, currNsInfo->version );
- assert( self->currNameSpace = xmlNewNs( rootNode, (xmlChar*) correctNameSpace, NULL ) );
+ self->currNameSpace = xmlNewNs( rootNode, (xmlChar*) correctNameSpace, NULL );
+ assert( self->currNameSpace );
xmlSetNs( rootNode, self->currNameSpace );
xmlDocSetRootElement( self->currDoc, rootNode );
More information about the cig-commits
mailing list