[Expat-checkins] expat/lib xmlparse.c,1.58,1.59
Fred L. Drake
fdrake@users.sourceforge.net
Wed Jul 31 22:44:03 2002
Update of /cvsroot/expat/expat/lib
In directory usw-pr-cvs1:/tmp/cvs-serv663
Modified Files:
xmlparse.c
Log Message:
doProlog(): Use NULL instead of 0 to clear pointer variables.
getContext(): The needSep local is Boolean, so declare & set it that
way.
Index: xmlparse.c
===================================================================
RCS file: /cvsroot/expat/expat/lib/xmlparse.c,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -d -r1.58 -r1.59
--- xmlparse.c 31 Jul 2002 22:41:48 -0000 1.58
+++ xmlparse.c 1 Aug 2002 05:42:57 -0000 1.59
@@ -3404,11 +3404,11 @@
return XML_ERROR_NO_MEMORY;
if (declEntity->name != name) {
poolDiscard(&dtd.pool);
- declEntity = 0;
+ declEntity = NULL;
}
else {
poolFinish(&dtd.pool);
- declEntity->publicId = 0;
+ declEntity->publicId = NULL;
declEntity->is_param = XML_TRUE;
/* if we have a parent parser or are reading an internal parameter
entity, then the entity declaration is not considered "internal"
@@ -4426,7 +4426,7 @@
getContext(XML_Parser parser)
{
HASH_TABLE_ITER iter;
- int needSep = 0;
+ XML_Bool needSep = XML_FALSE;
if (dtd.defaultPrefix.binding) {
int i;
@@ -4439,7 +4439,7 @@
for (i = 0; i < len; i++)
if (!poolAppendChar(&tempPool, dtd.defaultPrefix.binding->uri[i]))
return NULL;
- needSep = 1;
+ needSep = XML_TRUE;
}
hashTableIterInit(&iter, &(dtd.prefixes));
@@ -4465,7 +4465,7 @@
for (i = 0; i < len; i++)
if (!poolAppendChar(&tempPool, prefix->binding->uri[i]))
return NULL;
- needSep = 1;
+ needSep = XML_TRUE;
}
@@ -4482,7 +4482,7 @@
for (s = e->name; *s; s++)
if (!poolAppendChar(&tempPool, *s))
return 0;
- needSep = 1;
+ needSep = XML_TRUE;
}
if (!poolAppendChar(&tempPool, XML_T('\0')))