summaryrefslogtreecommitdiff
path: root/xpath.c
diff options
context:
space:
mode:
authorNick Wellnhofer <wellnhofer@aevum.de>2022-09-01 03:14:13 +0200
committerNick Wellnhofer <wellnhofer@aevum.de>2022-09-01 03:35:19 +0200
commit2cac626976ac6f5883b35cf1b7b30baa5312a2ce (patch)
tree384bd45c92a659685e131b760011d97caa26f039 /xpath.c
parentad338ca737c4df5a4d1c28f8ee18b878572f2964 (diff)
downloadlibxml2-2cac626976ac6f5883b35cf1b7b30baa5312a2ce.tar.gz
Don't use sizeof(xmlChar) or sizeof(char)
Diffstat (limited to 'xpath.c')
-rw-r--r--xpath.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/xpath.c b/xpath.c
index abc08c98..9ad0f0e1 100644
--- a/xpath.c
+++ b/xpath.c
@@ -9921,7 +9921,7 @@ xmlXPathParseNameComplex(xmlXPathParserContextPtr ctxt, int qualified) {
if (len > XML_MAX_NAME_LENGTH) {
XP_ERRORNULL(XPATH_EXPR_ERROR);
}
- buffer = (xmlChar *) xmlMallocAtomic(max * sizeof(xmlChar));
+ buffer = (xmlChar *) xmlMallocAtomic(max);
if (buffer == NULL) {
XP_ERRORNULL(XPATH_MEMORY_ERROR);
}
@@ -9938,8 +9938,7 @@ xmlXPathParseNameComplex(xmlXPathParserContextPtr ctxt, int qualified) {
XP_ERRORNULL(XPATH_EXPR_ERROR);
}
max *= 2;
- tmp = (xmlChar *) xmlRealloc(buffer,
- max * sizeof(xmlChar));
+ tmp = (xmlChar *) xmlRealloc(buffer, max);
if (tmp == NULL) {
xmlFree(buffer);
XP_ERRORNULL(XPATH_MEMORY_ERROR);