From 73ee6f7f4d76c442fb7a3ba3087061b4eef604e3 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Fri, 26 May 2017 11:49:21 +0100 Subject: expression: don't trim off unary expression on delinearization This transformation introduces an unnecessary asymmetry between the linearization and delinearization steps that prevent rule deletion by name to work fine. Moreover, do not print htonl and ntonl from unary expression, this syntax is not allowed by the parser. Signed-off-by: Pablo Neira Ayuso --- src/expression.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'src/expression.c') diff --git a/src/expression.c b/src/expression.c index 5defa63f..55dd3911 100644 --- a/src/expression.c +++ b/src/expression.c @@ -460,10 +460,7 @@ const char *expr_op_symbols[] = { static void unary_expr_print(const struct expr *expr) { - if (expr_op_symbols[expr->op] != NULL) - printf("%s(", expr_op_symbols[expr->op]); expr_print(expr->arg); - printf(")"); } static void unary_expr_clone(struct expr *new, const struct expr *expr) -- cgit v1.2.3