parser/libxml2: shorten parser_feed()
This commit is contained in:
@@ -273,11 +273,7 @@ int parser_reset(parser_t *parser)
|
||||
/* feed a chunk of data to the parser */
|
||||
int parser_feed(parser_t *parser, char *chunk, int len)
|
||||
{
|
||||
/* xmlParseChunk API returns 0 on success which is opposite logic to
|
||||
/* xmlParseChunk API returns 0 on success which is opposite logic to
|
||||
the status returned by parser_feed */
|
||||
if(!xmlParseChunk(parser->xmlctx, chunk, len, 0)) {
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
return !xmlParseChunk(parser->xmlctx, chunk, len, 0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user