Module: sip-router Branch: master Commit: ba63bfee9c4406d4694e886cf2d0236e8a3cc893 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=ba63bfee...
Author: Andrei Pelinescu-Onciul andrei@iptel.org Committer: Andrei Pelinescu-Onciul andrei@iptel.org Date: Thu Aug 26 21:52:24 2010 +0200
textops(k): declare variables at function start
Fixes compilation with gcc < 3.0.
---
modules_k/textops/api.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/modules_k/textops/api.c b/modules_k/textops/api.c index f2bd094..aad62e1 100644 --- a/modules_k/textops/api.c +++ b/modules_k/textops/api.c @@ -53,12 +53,14 @@ int remove_hf_api(struct sip_msg *msg, str* str_hf){
int search_append_api(struct sip_msg *msg, str *regex, str *data_str){ int retval; + char *data; + void **param; - char *data=pkg_malloc(data_str->len+1); + data=pkg_malloc(data_str->len+1); memcpy(data,data_str->s,data_str->len); memset(data+data_str->len,0,1); - void **param=pkg_malloc(sizeof(void*)); + param=pkg_malloc(sizeof(void*)); *param=pkg_malloc(regex->len+1); memcpy(*param,regex->s,regex->len); memset(*param+regex->len,0,1);