[sr-dev] git:master: core: minor append_branch cleanup

Andrei Pelinescu-Onciul andrei at iptel.org
Thu Sep 30 13:19:08 CEST 2010


Module: sip-router
Branch: master
Commit: be3c27905011c86069905d1fcbeddaa46f2d06aa
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=be3c27905011c86069905d1fcbeddaa46f2d06aa

Author: Andrei Pelinescu-Onciul <andrei at iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei at iptel.org>
Date:   Sat Sep 11 18:19:44 2010 +0200

core: minor append_branch cleanup

The 2 script versions for append_branch without parameters are now
equivalent (append_branch and append_branch()).

---

 cfg.y |   18 +++++++++++++++---
 1 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/cfg.y b/cfg.y
index d98372d..dee2e2d 100644
--- a/cfg.y
+++ b/cfg.y
@@ -3130,9 +3130,21 @@ cmd:
 		$$=mk_action(APPEND_BRANCH_T, 2, STRING_ST, $3, NUMBER_ST, (void *)(long)q);
 		set_cfg_pos($$);
 	}
-	| APPEND_BRANCH LPAREN STRING RPAREN { $$=mk_action(APPEND_BRANCH_T, 2, STRING_ST, $3, NUMBER_ST, (void *)Q_UNSPECIFIED); set_cfg_pos($$); }
-	| APPEND_BRANCH LPAREN RPAREN { $$=mk_action(APPEND_BRANCH_T, 2, STRING_ST, 0, NUMBER_ST, (void *)Q_UNSPECIFIED); set_cfg_pos($$); }
-	| APPEND_BRANCH {  $$=mk_action( APPEND_BRANCH_T, 1, STRING_ST, 0); set_cfg_pos($$); }
+	| APPEND_BRANCH LPAREN STRING RPAREN {
+		$$=mk_action(APPEND_BRANCH_T, 2, STRING_ST, $3,
+							NUMBER_ST, (void *)Q_UNSPECIFIED);
+		set_cfg_pos($$);
+	}
+	| APPEND_BRANCH LPAREN RPAREN {
+		$$=mk_action(APPEND_BRANCH_T, 2, STRING_ST, 0,
+							NUMBER_ST, (void *)Q_UNSPECIFIED);
+		set_cfg_pos($$);
+	}
+	| APPEND_BRANCH {
+		$$=mk_action(APPEND_BRANCH_T, 2, STRING_ST, 0,
+							NUMBER_ST, (void *)Q_UNSPECIFIED);
+		set_cfg_pos($$);
+	}
 	| SET_HOSTPORT LPAREN STRING RPAREN { $$=mk_action(SET_HOSTPORT_T, 1, STRING_ST, $3); set_cfg_pos($$); }
 	| SET_HOSTPORT error { $$=0; yyerror("missing '(' or ')' ?"); }
 	| SET_HOSTPORT LPAREN error RPAREN { $$=0; yyerror("bad argument, string expected"); }




More information about the sr-dev mailing list