Module: kamailio
Branch: master
Commit: 23b476ed7c7b48ddd7cacf3d88e9c104db06d5dc
URL:
https://github.com/kamailio/kamailio/commit/23b476ed7c7b48ddd7cacf3d88e9c10…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2015-05-14T10:25:47+02:00
core: init vars for socket ttl helper function to avoid warnings
---
Modified: sock_ut.c
---
Diff:
https://github.com/kamailio/kamailio/commit/23b476ed7c7b48ddd7cacf3d88e9c10…
Patch:
https://github.com/kamailio/kamailio/commit/23b476ed7c7b48ddd7cacf3d88e9c10…
---
diff --git a/sock_ut.c b/sock_ut.c
index 69764c5..b1da20d 100644
--- a/sock_ut.c
+++ b/sock_ut.c
@@ -35,8 +35,8 @@
*/
int sock_get_ttl(int sock)
{
- int ioptval;
- unsigned int ioptvallen;
+ int ioptval = 0;
+ unsigned int ioptvallen = 0;
ioptvallen=sizeof(ioptval);
if (getsockopt( sock, IPPROTO_IP, IP_TTL, (void*) &ioptval,
@@ -54,7 +54,7 @@ int sock_get_ttl(int sock)
*/
int sock_set_ttl(int sock, int ttl)
{
- int ioptval;
+ int ioptval = 0;
if (setsockopt( sock, IPPROTO_IP, IP_TTL, (void*) &ioptval,
sizeof(ioptval)) == -1 )