X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Ffilter%2Ffilter-parser.ypp;h=0f11c234d6197f30ab3b9cea48ea749bf6697fbe;hp=89f6b43d911f7de5a17db2dd25dadfb2aaf74262;hb=64803277bbdbe0a943360d918298a48157d9da55;hpb=60f1b42d6280b6bd386abb726dca4fd3b31d8491 diff --git a/src/common/filter/filter-parser.ypp b/src/common/filter/filter-parser.ypp index 89f6b43d9..0f11c234d 100644 --- a/src/common/filter/filter-parser.ypp +++ b/src/common/filter/filter-parser.ypp @@ -97,7 +97,7 @@ static struct gc_string *gc_string_alloc(struct filter_parser_ctx *parser_ctx, for (alloclen = 8; alloclen < sizeof(long) + sizeof(*gstr) + len; alloclen *= 2); - gstr = (gc_string *) zmalloc(alloclen); + gstr = zmalloc(alloclen); if (!gstr) { goto end; } @@ -154,7 +154,7 @@ static struct filter_node *make_node(struct filter_parser_ctx *scanner, struct filter_ast *ast = filter_parser_get_ast(scanner); struct filter_node *node; - node = (filter_node *) zmalloc(sizeof(*node)); + node = zmalloc(); if (!node) return NULL; memset(node, 0, sizeof(*node)); @@ -191,7 +191,7 @@ static struct filter_node *make_op_node(struct filter_parser_ctx *scanner, struct filter_ast *ast = filter_parser_get_ast(scanner); struct filter_node *node; - node = (filter_node *) zmalloc(sizeof(*node)); + node = zmalloc(); if (!node) return NULL; memset(node, 0, sizeof(*node)); @@ -227,7 +227,7 @@ static struct filter_ast *filter_ast_alloc(void) { struct filter_ast *ast; - ast = (filter_ast *) zmalloc(sizeof(*ast)); + ast = zmalloc(); if (!ast) return NULL; memset(ast, 0, sizeof(*ast)); @@ -257,7 +257,7 @@ struct filter_parser_ctx *filter_parser_ctx_alloc(FILE *input) yydebug = filter_parser_debug; - parser_ctx = (filter_parser_ctx *) zmalloc(sizeof(*parser_ctx)); + parser_ctx = zmalloc(); if (!parser_ctx) return NULL; memset(parser_ctx, 0, sizeof(*parser_ctx));