char *user;
char *pass;
char *credentials;
- _Bool digest;
- _Bool verify_peer;
- _Bool verify_host;
+ bool digest;
+ bool verify_peer;
+ bool verify_host;
char *cacert;
char *post_body;
int timeout;
}
if (ds->ds_num != xpath->values_len) {
- WARNING("curl_xml plugin: DataSet `%s' requires %zu values, but config "
- "talks about %zu",
+ WARNING("curl_xml plugin: DataSet `%s' requires %" PRIsz
+ " values, but config talks about %" PRIsz,
xpath->type, ds->ds_num, xpath->values_len);
return -1;
}
return -1;
} /* }}} cx_if_not_text_node */
+/*
+ * Returned value should be freed with xmlFree().
+ */
static char *cx_get_text_node_value(xmlXPathContextPtr xpath_ctx, /* {{{ */
char *expr, const char *from_option) {
xmlXPathObjectPtr values_node_obj = cx_evaluate_xpath(xpath_ctx, expr);
/* endptr = */ NULL);
}
- sfree(node_value);
+ xmlFree(node_value);
/* We have reached here which means that
* we have got something to work */
else
sstrncpy(vl->type_instance, node_value, sizeof(vl->type_instance));
- sfree(node_value);
+ xmlFree(node_value);
} else if (xpath->instance_prefix != NULL)
sstrncpy(vl->type_instance, xpath->instance_prefix,
sizeof(vl->type_instance));
return -1;
sstrncpy(vl->plugin_instance, node_value, sizeof(vl->plugin_instance));
- sfree(node_value);
+ xmlFree(node_value);
}
return 0;