From a1af03965a04ad4e4e22978d47d87c858f479323 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Thu, 13 May 2021 19:45:41 +0100 Subject: Perf tester: Remove bogus library initialisation/finalisation calls. --- perf/hubbub.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'perf') diff --git a/perf/hubbub.c b/perf/hubbub.c index d0ca8ec..70e0630 100644 --- a/perf/hubbub.c +++ b/perf/hubbub.c @@ -131,14 +131,11 @@ int main(int argc, char **argv) int fd; uint8_t *file; - if (argc != 3) { - printf("Usage: %s \n", argv[0]); + if (argc != 2) { + printf("Usage: %s \n", argv[0]); return 1; } - /* Initialise library */ - assert(hubbub_initialise(argv[1], myrealloc, NULL) == HUBBUB_OK); - assert(hubbub_parser_create("UTF-8", false, myrealloc, NULL, &parser) == HUBBUB_OK); @@ -150,15 +147,13 @@ int main(int argc, char **argv) assert(hubbub_parser_setopt(parser, HUBBUB_PARSER_DOCUMENT_NODE, ¶ms) == HUBBUB_OK); - stat(argv[2], &info); - fd = open(argv[2], 0); + stat(argv[1], &info); + fd = open(argv[1], 0); file = mmap(NULL, info.st_size, PROT_READ, MAP_SHARED, fd, 0); assert(hubbub_parser_parse_chunk(parser, file, info.st_size) == HUBBUB_OK); - assert(hubbub_finalise(myrealloc, NULL) == HUBBUB_OK); - return HUBBUB_OK; } -- cgit v1.2.3