Module: kamailio
Branch: master
Commit: c8eeed253763d4407268494f89050b7681518091
URL:
https://github.com/kamailio/kamailio/commit/c8eeed253763d4407268494f89050b7…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2015-01-11T16:51:36+01:00
core: removed unused code
- removes also some clang compile warnings
---
Modified: cfg.y
Modified: route_struct.c
---
Diff:
https://github.com/kamailio/kamailio/commit/c8eeed253763d4407268494f89050b7…
Patch:
https://github.com/kamailio/kamailio/commit/c8eeed253763d4407268494f89050b7…
---
diff --git a/cfg.y b/cfg.y
index 7184191..cd3d317 100644
--- a/cfg.y
+++ b/cfg.y
@@ -2153,19 +2153,6 @@ exp_elem:
{ $$=0; yyerror(" URI, SRCIP or DSTIP expected"); }
| MYSELF error { $$=0; yyerror ("invalid operator, == or != expected"); }
;
-/*
-exp_elem2:
- rval_expr cmpop rval_expr %prec GT
- { $$=mk_elem( $2, RVE_ST, $1, RVE_ST, $3);}
- |
- rval_expr equalop rval_expr %prec EQUAL_T
- { $$=mk_elem( $2, RVE_ST, $1, RVE_ST, $3);}
- | rval_expr LOG_AND rval_expr
- { $$=mk_exp_rve(LOGAND_OP, $1, $3);}
- | rval_expr LOG_OR rval_expr
- { $$=mk_exp_rve(LOGOR_OP, $1, $3);}
-;
-*/
ipnet:
ip SLASH ip { $$=mk_new_net($1, $3); }
diff --git a/route_struct.c b/route_struct.c
index f14ed2a..d57a736 100644
--- a/route_struct.c
+++ b/route_struct.c
@@ -83,27 +83,6 @@ struct expr* mk_exp(int op, struct expr* left, struct expr* right)
}
-struct expr* mk_exp_rve(int op, void* left, void* right)
-{
- struct expr * e;
- e=(struct expr*)pkg_malloc(sizeof (struct expr));
- if (e==0) goto error;
- e->type=EXP_T;
- e->op=op;
- e->l.param=mk_elem(RVEXP_O, RVE_ST, left, 0, 0);
- e->r.param=mk_elem(RVEXP_O, RVE_ST, right, 0, 0);
- if (e->l.param==0 || e->r.param==0){
- if (e->l.param) pkg_free(e->l.param);
- if (e->r.param) pkg_free(e->r.param);
- pkg_free(e);
- goto error;
- }
- return e;
-error:
- LM_CRIT("memory allocation failure\n");
- return 0;
-}
-
struct expr* mk_elem(int op, expr_l_type ltype, void* lparam,
expr_r_type rtype, void* rparam)
{