Browse code

core: removed unused code

- removes also some clang compile warnings

Daniel-Constantin Mierla authored on 11/01/2015 15:51:36
Showing 2 changed files
... ...
@@ -2153,19 +2153,6 @@ exp_elem:
2153 2153
 		{ $$=0; yyerror(" URI, SRCIP or DSTIP expected"); }
2154 2154
 	| MYSELF error	{ $$=0; yyerror ("invalid operator, == or != expected"); }
2155 2155
 	;
2156
-/*
2157
-exp_elem2:
2158
-	rval_expr cmpop rval_expr %prec GT
2159
-		{ $$=mk_elem( $2, RVE_ST, $1, RVE_ST, $3);}
2160
-	|
2161
-	rval_expr equalop rval_expr %prec EQUAL_T
2162
-		{ $$=mk_elem( $2, RVE_ST, $1, RVE_ST, $3);}
2163
-	| rval_expr LOG_AND rval_expr
2164
-		{ $$=mk_exp_rve(LOGAND_OP, $1, $3);}
2165
-	| rval_expr LOG_OR rval_expr
2166
-		{ $$=mk_exp_rve(LOGOR_OP, $1, $3);}
2167
-;
2168
-*/
2169 2156
 
2170 2157
 ipnet:
2171 2158
 	ip SLASH ip	{ $$=mk_new_net($1, $3); }
... ...
@@ -83,27 +83,6 @@ error:
83 83
 }
84 84
 
85 85
 
86
-struct expr* mk_exp_rve(int op, void* left, void* right)
87
-{
88
-	struct expr * e;
89
-	e=(struct expr*)pkg_malloc(sizeof (struct expr));
90
-	if (e==0) goto error;
91
-	e->type=EXP_T;
92
-	e->op=op;
93
-	e->l.param=mk_elem(RVEXP_O, RVE_ST, left, 0, 0);
94
-	e->r.param=mk_elem(RVEXP_O, RVE_ST, right, 0, 0);
95
-	if (e->l.param==0 || e->r.param==0){
96
-		if (e->l.param) pkg_free(e->l.param);
97
-		if (e->r.param) pkg_free(e->r.param);
98
-		pkg_free(e);
99
-		goto error;
100
-	}
101
-	return e;
102
-error:
103
-	LM_CRIT("memory allocation failure\n");
104
-	return 0;
105
-}
106
-
107 86
 struct expr* mk_elem(int op, expr_l_type ltype, void* lparam,
108 87
 							 expr_r_type rtype, void* rparam)
109 88
 {