Module: sip-router
Branch: master
Commit: ebe16f75b38c76dab141ca9583b10b67e4f45f57
URL:    
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=ebe16f75b38c76dab141ca9583b10b67e4f45f57

Author: Alex Hermann <[email protected]>
Committer: Alex Hermann <[email protected]>
Date:   Mon Jan 28 13:06:08 2013 +0100

lib/srdb1: Fix compilation warning on 32-bit architectures

On "bits-challenged" architectures, long != 64 bits.
Use long long instead, seems to work on 64-bit archs too.

---

 lib/srdb1/db_ut.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/srdb1/db_ut.c b/lib/srdb1/db_ut.c
index 9942cdc..c57ef4d 100644
--- a/lib/srdb1/db_ut.c
+++ b/lib/srdb1/db_ut.c
@@ -465,7 +465,7 @@ int db_val2pv_spec(struct sip_msg* msg, db_val_t *dbval, 
pv_spec_t *pvs)
                                db_longlong2str(dbval->val.ll_val, ll_buf, 
&pv.rs.len);
                                pv.rs.s = ll_buf;
                                /* if it fits, also store as 32 bit integer*/
-                               if (! ((unsigned long)dbval->val.ll_val & 
0xffffffff00000000)) {
+                               if (! ((unsigned long long)dbval->val.ll_val & 
0xffffffff00000000ULL)) {
                                        pv.flags |= PV_VAL_INT | PV_TYPE_INT;
                                        pv.ri = (int)dbval->val.ll_val;
                                }


_______________________________________________
sr-dev mailing list
[email protected]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to