[sr-dev] git:andrei/pointer_alias_warnings: group: fix pointer aliasing warnings
Andrei Pelinescu-Onciul
andrei at iptel.org
Tue Oct 13 20:14:48 CEST 2009
Module: sip-router
Branch: andrei/pointer_alias_warnings
Commit: 221e87850861f8772abf8cc98334970ab59dfa70
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=221e87850861f8772abf8cc98334970ab59dfa70
Author: Andrei Pelinescu-Onciul <andrei at iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei at iptel.org>
Date: Mon Oct 12 18:53:27 2009 +0200
group: fix pointer aliasing warnings
---
modules_k/group/re_group.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/modules_k/group/re_group.c b/modules_k/group/re_group.c
index 2e38d8c..542e02b 100644
--- a/modules_k/group/re_group.c
+++ b/modules_k/group/re_group.c
@@ -163,6 +163,7 @@ int get_user_group(struct sip_msg *req, char *user, char *avp)
regmatch_t pmatch;
char *c;
int n;
+ int* pi;
if (get_username_domain( req, (group_check_p)user, &username, &domain)!=0){
LM_ERR("failed to get username at domain\n");
@@ -179,7 +180,8 @@ int get_user_group(struct sip_msg *req, char *user, char *avp)
goto error;
}
- *(int*)uri_buf = htonl(('s'<<24) + ('i'<<16) + ('p'<<8) + ':');
+ pi=(int*)uri_buf;
+ *pi = htonl(('s'<<24) + ('i'<<16) + ('p'<<8) + ':');
c = uri_buf + 4;
memcpy( c, username.s, username.len);
c += username.len;
More information about the sr-dev
mailing list