Module: kamailio
Branch: 4.2
Commit: 7ce10a5c6df8a8ee679dabb42cc719bbbb4fa381
URL:
https://github.com/kamailio/kamailio/commit/7ce10a5c6df8a8ee679dabb42cc719b…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2015-01-28T13:36:53+01:00
core: removed unused code
- removes also some clang compile warnings
(cherry picked from commit c8eeed253763d4407268494f89050b7681518091)
---
Modified: cfg.y
Modified: route_struct.c
---
Diff:
https://github.com/kamailio/kamailio/commit/7ce10a5c6df8a8ee679dabb42cc719b…
Patch:
https://github.com/kamailio/kamailio/commit/7ce10a5c6df8a8ee679dabb42cc719b…
---
diff --git a/cfg.y b/cfg.y
index 6a85292..6289c61 100644
--- a/cfg.y
+++ b/cfg.y
@@ -2151,19 +2151,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 11c11fa..b5b702e 100644
--- a/route_struct.c
+++ b/route_struct.c
@@ -99,27 +99,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)
{