summaryrefslogtreecommitdiffstats
path: root/chromium/third_party/libxml/src/HTMLparser.c
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/libxml/src/HTMLparser.c')
-rw-r--r--chromium/third_party/libxml/src/HTMLparser.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/chromium/third_party/libxml/src/HTMLparser.c b/chromium/third_party/libxml/src/HTMLparser.c
index fd71aee89f9..93b6661ba93 100644
--- a/chromium/third_party/libxml/src/HTMLparser.c
+++ b/chromium/third_party/libxml/src/HTMLparser.c
@@ -326,7 +326,7 @@ htmlNodeInfoPop(htmlParserCtxtPtr ctxt)
#define CUR_SCHAR(s, l) xmlStringCurrentChar(ctxt, s, &l)
#define COPY_BUF(l,b,i,v) \
- if (l == 1) b[i++] = (xmlChar) v; \
+ if (l == 1) b[i++] = v; \
else i += xmlCopyChar(l,&b[i],v)
/**
@@ -2074,8 +2074,8 @@ static const htmlEntityDesc html40EntitiesTable[] = {
#define growBuffer(buffer) { \
xmlChar *tmp; \
buffer##_size *= 2; \
- tmp = (xmlChar *) xmlRealloc(buffer, buffer##_size * sizeof(xmlChar)); \
- if (tmp == NULL) { \
+ tmp = (xmlChar *) xmlRealloc(buffer, buffer##_size); \
+ if (tmp == NULL) { \
htmlErrMemory(ctxt, "growing buffer\n"); \
xmlFree(buffer); \
return(NULL); \
@@ -2744,7 +2744,7 @@ htmlParseHTMLAttribute(htmlParserCtxtPtr ctxt, const xmlChar stop) {
* allocate a translation buffer.
*/
buffer_size = HTML_PARSER_BUFFER_SIZE;
- buffer = (xmlChar *) xmlMallocAtomic(buffer_size * sizeof(xmlChar));
+ buffer = (xmlChar *) xmlMallocAtomic(buffer_size);
if (buffer == NULL) {
htmlErrMemory(ctxt, "buffer allocation failed\n");
return(NULL);
@@ -3380,7 +3380,7 @@ htmlParsePI(htmlParserCtxtPtr ctxt) {
ctxt->instate = state;
return;
}
- buf = (xmlChar *) xmlMallocAtomic(size * sizeof(xmlChar));
+ buf = (xmlChar *) xmlMallocAtomic(size);
if (buf == NULL) {
htmlErrMemory(ctxt, NULL);
ctxt->instate = state;
@@ -3398,7 +3398,7 @@ htmlParsePI(htmlParserCtxtPtr ctxt) {
xmlChar *tmp;
size *= 2;
- tmp = (xmlChar *) xmlRealloc(buf, size * sizeof(xmlChar));
+ tmp = (xmlChar *) xmlRealloc(buf, size);
if (tmp == NULL) {
htmlErrMemory(ctxt, NULL);
xmlFree(buf);
@@ -3480,7 +3480,7 @@ htmlParseComment(htmlParserCtxtPtr ctxt) {
ctxt->instate = XML_PARSER_COMMENT;
SHRINK;
SKIP(4);
- buf = (xmlChar *) xmlMallocAtomic(size * sizeof(xmlChar));
+ buf = (xmlChar *) xmlMallocAtomic(size);
if (buf == NULL) {
htmlErrMemory(ctxt, "buffer allocation failed\n");
ctxt->instate = state;
@@ -3529,7 +3529,7 @@ htmlParseComment(htmlParserCtxtPtr ctxt) {
xmlChar *tmp;
size *= 2;
- tmp = (xmlChar *) xmlRealloc(buf, size * sizeof(xmlChar));
+ tmp = (xmlChar *) xmlRealloc(buf, size);
if (tmp == NULL) {
xmlFree(buf);
htmlErrMemory(ctxt, "growing buffer failed\n");
@@ -5924,7 +5924,7 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) {
* Handle preparsed entities and charRef
*/
if (ctxt->token != 0) {
- chr[0] = (xmlChar) ctxt->token;
+ chr[0] = ctxt->token;
htmlCheckParagraph(ctxt);
if ((ctxt->sax != NULL) && (ctxt->sax->characters != NULL))
ctxt->sax->characters(ctxt->userData, chr, 1);