Module: kamailio
Branch: master
Commit: 378a2dc98beddaa08e192c0854f43929ed7076a7
URL:
https://github.com/kamailio/kamailio/commit/378a2dc98beddaa08e192c0854f4392…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2021-11-10T20:09:24+01:00
ctl: use unsigned literals for left bit shifting
---
Modified: src/modules/ctl/binrpc.h
---
Diff:
https://github.com/kamailio/kamailio/commit/378a2dc98beddaa08e192c0854f4392…
Patch:
https://github.com/kamailio/kamailio/commit/378a2dc98beddaa08e192c0854f4392…
---
diff --git a/src/modules/ctl/binrpc.h b/src/modules/ctl/binrpc.h
index 3642a0015b..bd7e2cb9c5 100644
--- a/src/modules/ctl/binrpc.h
+++ b/src/modules/ctl/binrpc.h
@@ -188,7 +188,7 @@ struct binrpc_val{
inline static int binrpc_get_int_len(int i)
{
int size;
- for (size=4; size && ((i & (0xff<<24))==0); i<<=8, size--);
+ for (size=4; size && ((i & (0xffu<<24))==0); i<<=8, size--);
return size;
}
@@ -216,7 +216,7 @@ inline static unsigned char* binrpc_write_int( unsigned char* p,
{
int size;
- for (size=4; size && ((i & (0xff<<24))==0); i<<=8, size--);
+ for (size=4; size && ((i & (0xffu<<24))==0); i<<=8, size--);
*len=size;
for(; (p<end) && (size); p++, size--){
*p=(unsigned char)(i>>24);