From 0be37812bdb5ac784080833c9cce564d73f868aa Mon Sep 17 00:00:00 2001 From: Christoph Mallon Date: Thu, 23 Jun 2011 10:46:11 +0200 Subject: [PATCH] Inline allocate_ast() into its only caller (allocate_ast_zero()). --- ast_t.h | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/ast_t.h b/ast_t.h index 601d578..e05e633 100644 --- a/ast_t.h +++ b/ast_t.h @@ -667,11 +667,6 @@ struct translation_unit_t { statement_t *global_asm; }; -static inline void *allocate_ast(size_t size) -{ - return obstack_alloc(&ast_obstack, size); -} - static inline bool is_invalid_expression(expression_t *expression) { return expression->base.kind == EXPR_INVALID; @@ -688,9 +683,7 @@ static inline bool is_invalid_statement(statement_t *statement) */ static inline void *allocate_ast_zero(size_t size) { - void *res = allocate_ast(size); - memset(res, 0, size); - return res; + return memset(obstack_alloc(&ast_obstack, size), 0, size); } /** If set, implicit casts are printed. */ -- 2.20.1