[sr-dev] git:sr_3.0: registrar(k): gcc 2.95 compile fixes

Andrei Pelinescu-Onciul andrei at iptel.org
Mon Oct 12 18:32:50 CEST 2009


Module: sip-router
Branch: sr_3.0
Commit: 744634370288693d7c2c0ea88af14aff45add729
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=744634370288693d7c2c0ea88af14aff45add729

Author: Andrei Pelinescu-Onciul <andrei at iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei at iptel.org>
Date:   Mon Oct 12 18:05:33 2009 +0200

registrar(k): gcc 2.95 compile fixes

- variables must be declared at the beginning of a block

---

 modules_k/registrar/common.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/modules_k/registrar/common.c b/modules_k/registrar/common.c
index e6cb541..8dbd5e1 100644
--- a/modules_k/registrar/common.c
+++ b/modules_k/registrar/common.c
@@ -50,8 +50,6 @@
 int extract_aor(str* _uri, str* _a)
 {
 	static char aor_buf[MAX_AOR_LEN];
-	memset(aor_buf, 0, MAX_AOR_LEN);
-
 	str tmp;
 	struct sip_uri puri;
 	int user_len;
@@ -59,6 +57,7 @@ int extract_aor(str* _uri, str* _a)
 	struct usr_avp *avp;
 	str *uri;
 
+	memset(aor_buf, 0, MAX_AOR_LEN);
 	if (aor_avp_name.n!=0) {
 		avp = search_first_avp( aor_avp_type, aor_avp_name, &avp_val, 0);
 		if (avp && is_avp_str_val(avp)) {




More information about the sr-dev mailing list