Force usage of assert() condition when NDEBUG is defined
[lttng-tools.git] / tests / utils / xml-utils / extract_xml.c
index 32c57e60a93c3f462069623f994ae2056ecf8e14..011f38f4a65c17d36464ffc4697864c66410fc05 100644 (file)
@@ -24,7 +24,6 @@
  *     node;b;
  *     node;c;
  */
-#include <assert.h>
 #include <stdbool.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -59,11 +58,11 @@ static int print_xpath_nodes(xmlDocPtr doc, xmlNodeSetPtr nodes, FILE *output)
        xmlNodePtr cur;
        xmlChar *node_child_value_string = NULL;
 
-       assert(output);
+       LTTNG_ASSERT(output);
        size = (nodes) ? nodes->nodeNr : 0;
 
        for (i = 0; i < size; ++i) {
-               assert(nodes->nodeTab[i]);
+               LTTNG_ASSERT(nodes->nodeTab[i]);
 
                if (nodes->nodeTab[i]->type == XML_NAMESPACE_DECL) {
                        fprintf(stderr, "ERR:%s\n",
@@ -170,8 +169,8 @@ static int extract_xpath(const char *xml_path, const xmlChar *xpath)
        xmlXPathContextPtr xpathCtx = NULL;
        xmlXPathObjectPtr xpathObj = NULL;
 
-       assert(xml_path);
-       assert(xpath);
+       LTTNG_ASSERT(xml_path);
+       LTTNG_ASSERT(xpath);
 
        /* Parse the xml file */
        doc = xmlParseFile(xml_path);
This page took 0.023153 seconds and 4 git commands to generate.