[xml] Problem with xmlListAppend
- From: Georges-André SILBER <silber cri ensmp fr>
- To: xml gnome org
- Subject: [xml] Problem with xmlListAppend
- Date: Wed, 9 May 2007 14:15:52 +0200
Hi,
The code of xmlListAppend() in list.c (from current trunk) is
incorrect. It returns 1 when there is no error and 0 (or 1!) when
there is an error.
I think this should be corrected as follows:
Index: list.c
===================================================================
--- list.c (revision 3613)
+++ list.c (working copy)
@@ -314,14 +314,14 @@
if (lkNew == NULL) {
xmlGenericError(xmlGenericErrorContext,
"Cannot initialize memory for new link");
- return (0);
+ return (1);
}
lkNew->data = data;
lkNew->next = lkPlace->next;
(lkPlace->next)->prev = lkNew;
lkPlace->next = lkNew;
lkNew->prev = lkPlace;
- return 1;
+ return 0;
}
/**
Best regards,
Georges-André SILBER
Centre de recherche en informatique
Ecole des mines de Paris / ARMINES
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]