1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-01-12 09:17:37 +03:00

relaxng: Remove useless if statement

ctxt and define are non-NULL at this point.

Fixes #482.
This commit is contained in:
Nick Wellnhofer 2023-02-21 15:39:44 +01:00
parent 0ce1f8427b
commit 1eb2ca9f47

View File

@ -7987,12 +7987,7 @@ xmlRelaxNGValidateCompiledCallback(xmlRegExecCtxtPtr exec ATTRIBUTE_UNUSED,
ctxt->errNo = XML_RELAXNG_ERR_INTERNAL;
return;
}
if ((ctxt == NULL) || (define == NULL)) {
fprintf(stderr, "callback on %s missing info\n", token);
if ((ctxt != NULL) && (ctxt->errNo == XML_RELAXNG_OK))
ctxt->errNo = XML_RELAXNG_ERR_INTERNAL;
return;
} else if (define->type != XML_RELAXNG_ELEMENT) {
if (define->type != XML_RELAXNG_ELEMENT) {
fprintf(stderr, "callback on %s define is not element\n", token);
if (ctxt->errNo == XML_RELAXNG_OK)
ctxt->errNo = XML_RELAXNG_ERR_INTERNAL;