Skip to content

Commit

Permalink
core: init vars for socket ttl helper function to avoid warnings
Browse files Browse the repository at this point in the history
(cherry picked from commit 23b476e)
  • Loading branch information
miconda committed May 19, 2015
1 parent c501513 commit e759e5c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sock_ut.c
Expand Up @@ -41,8 +41,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,
Expand All @@ -60,7 +60,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 )
Expand Down

0 comments on commit e759e5c

Please sign in to comment.