[sr-dev] git:master: modules_k/(auth|misc)_radius: added cast
Juha Heinanen
jh at tutpro.com
Sat Oct 15 16:10:00 CEST 2011
Module: sip-router
Branch: master
Commit: 242e0ada7df9d105f0045d68cb7481f33e2f04f3
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=242e0ada7df9d105f0045d68cb7481f33e2f04f3
Author: Juha Heinanen <jh at tutpro.com>
Committer: Juha Heinanen <jh at tutpro.com>
Date: Sat Oct 15 17:07:12 2011 +0300
modules_k/(auth|misc)_radius: added cast
- Added cast of int to long in order to avoid compiler warning on 64 bit
operating system.
---
modules_k/auth_radius/extra.c | 2 +-
modules_k/misc_radius/extra.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules_k/auth_radius/extra.c b/modules_k/auth_radius/extra.c
index a31b8bd..46a812c 100644
--- a/modules_k/auth_radius/extra.c
+++ b/modules_k/auth_radius/extra.c
@@ -190,7 +190,7 @@ int extra2strar( struct extra_attr *extra, struct sip_msg *rq, str *val_arr)
val_arr[n].len = 0;
} else if (value.flags&PV_VAL_INT) {
/* len = -1 denotes int type */
- val_arr[n].s = (char *)value.ri;
+ val_arr[n].s = (char *)(long)value.ri;
val_arr[n].len = -1;
} else {
/* set the value into the acc buffer */
diff --git a/modules_k/misc_radius/extra.c b/modules_k/misc_radius/extra.c
index a31b8bd..46a812c 100644
--- a/modules_k/misc_radius/extra.c
+++ b/modules_k/misc_radius/extra.c
@@ -190,7 +190,7 @@ int extra2strar( struct extra_attr *extra, struct sip_msg *rq, str *val_arr)
val_arr[n].len = 0;
} else if (value.flags&PV_VAL_INT) {
/* len = -1 denotes int type */
- val_arr[n].s = (char *)value.ri;
+ val_arr[n].s = (char *)(long)value.ri;
val_arr[n].len = -1;
} else {
/* set the value into the acc buffer */
More information about the sr-dev
mailing list