2
0
Эх сурвалжийг харах

registrar(k): gcc 2.95 compile fixes

- variables must be declared at the beginning of a block
Andrei Pelinescu-Onciul 16 жил өмнө
parent
commit
7446343702

+ 1 - 2
modules_k/registrar/common.c

@@ -50,8 +50,6 @@
 int extract_aor(str* _uri, str* _a)
 int extract_aor(str* _uri, str* _a)
 {
 {
 	static char aor_buf[MAX_AOR_LEN];
 	static char aor_buf[MAX_AOR_LEN];
-	memset(aor_buf, 0, MAX_AOR_LEN);
-
 	str tmp;
 	str tmp;
 	struct sip_uri puri;
 	struct sip_uri puri;
 	int user_len;
 	int user_len;
@@ -59,6 +57,7 @@ int extract_aor(str* _uri, str* _a)
 	struct usr_avp *avp;
 	struct usr_avp *avp;
 	str *uri;
 	str *uri;
 
 
+	memset(aor_buf, 0, MAX_AOR_LEN);
 	if (aor_avp_name.n!=0) {
 	if (aor_avp_name.n!=0) {
 		avp = search_first_avp( aor_avp_type, aor_avp_name, &avp_val, 0);
 		avp = search_first_avp( aor_avp_type, aor_avp_name, &avp_val, 0);
 		if (avp && is_avp_str_val(avp)) {
 		if (avp && is_avp_str_val(avp)) {