diff options
Diffstat (limited to 'chromium/third_party/libxml/src/testlimits.c')
-rw-r--r-- | chromium/third_party/libxml/src/testlimits.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/chromium/third_party/libxml/src/testlimits.c b/chromium/third_party/libxml/src/testlimits.c index 0b045eac83d..6322f8ba40c 100644 --- a/chromium/third_party/libxml/src/testlimits.c +++ b/chromium/third_party/libxml/src/testlimits.c @@ -17,7 +17,6 @@ #include <unistd.h> #endif #include <string.h> -#include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <time.h> @@ -1261,19 +1260,15 @@ saxTest(const char *filename, size_t limit, int options, int fail) { int res = 0; xmlParserCtxtPtr ctxt; xmlDocPtr doc; - xmlSAXHandlerPtr old_sax; nb_tests++; maxlen = limit; - ctxt = xmlNewParserCtxt(); + ctxt = xmlNewSAXParserCtxt(callbackSAX2Handler, NULL); if (ctxt == NULL) { fprintf(stderr, "Failed to create parser context\n"); return(1); } - old_sax = ctxt->sax; - ctxt->sax = callbackSAX2Handler; - ctxt->userData = NULL; doc = xmlCtxtReadFile(ctxt, filename, NULL, options); if (doc != NULL) { @@ -1296,7 +1291,6 @@ saxTest(const char *filename, size_t limit, int options, int fail) { } else res = 0; } - ctxt->sax = old_sax; xmlFreeParserCtxt(ctxt); return(res); |