Module: kamailio
Branch: master
Commit: 47169b6774759131e9e535f2b9d358772b777b9c
URL:
https://github.com/kamailio/kamailio/commit/47169b6774759131e9e535f2b9d3587…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-05-01T16:28:41+02:00
cdp: use same data type for size computing as pointer type
---
Modified: src/modules/cdp/acceptor.c
---
Diff:
https://github.com/kamailio/kamailio/commit/47169b6774759131e9e535f2b9d3587…
Patch:
https://github.com/kamailio/kamailio/commit/47169b6774759131e9e535f2b9d3587…
---
diff --git a/src/modules/cdp/acceptor.c b/src/modules/cdp/acceptor.c
index 003f531fe2..4821ddd38e 100644
--- a/src/modules/cdp/acceptor.c
+++ b/src/modules/cdp/acceptor.c
@@ -79,12 +79,12 @@ void acceptor_process(dp_config *cfg)
unsigned int sock;
LM_INFO("Acceptor process starting up...\n");
- listening_socks = pkg_malloc((cfg->acceptors_cnt+1)*sizeof(int));
+ listening_socks = pkg_malloc((cfg->acceptors_cnt+1)*sizeof(unsigned int));
if (!listening_socks){
- LOG_NO_MEM("pkg",(cfg->acceptors_cnt+1)*sizeof(int));
+ LOG_NO_MEM("pkg",(cfg->acceptors_cnt+1)*sizeof(unsigned int));
goto done;
}
- memset(listening_socks,0,(cfg->acceptors_cnt+1)*sizeof(int));
+ memset(listening_socks,0,(cfg->acceptors_cnt+1)*sizeof(unsigned int));
k=0;
for(i=0;i<cfg->acceptors_cnt;i++)
if (create_socket(cfg->acceptors[i].port,cfg->acceptors[i].bind,&sock)){