Skip to content

Commit

Permalink
Correct error check for inet_aton
Browse files Browse the repository at this point in the history
  • Loading branch information
msantos committed May 15, 2011
1 parent 4bd5794 commit a2e903f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion c_src/procket_cmd.c
Expand Up @@ -208,7 +208,7 @@ procket_parse_address(PROCKET_STATE *ps)

*p++ = '\0';
ps->port = (in_port_t)atoi(p);
if (inet_aton(ps->address, &in) < 0)
if (inet_aton(ps->address, &in) == 0)
return -1;
ps->ip = in.s_addr;

Expand Down

0 comments on commit a2e903f

Please sign in to comment.