Use sizeof() instead of re-using hard-coded values
This should help with portability for the protocol family eventually.
This commit is contained in:
parent
baed23c50c
commit
f61a3085f0
@ -225,8 +225,8 @@ run_tcp_server(fko_srv_options_t *opts)
|
||||
|
||||
if(opts->verbose)
|
||||
{
|
||||
memset(sipbuf, 0x0, MAX_IPV4_STR_LEN);
|
||||
inet_ntop(AF_INET, &(caddr.sin_addr.s_addr), sipbuf, MAX_IPV4_STR_LEN);
|
||||
memset(sipbuf, 0x0, sizeof(sipbuf));
|
||||
inet_ntop(AF_INET, &(caddr.sin_addr.s_addr), sipbuf, sizeof(sipbuf));
|
||||
log_msg(LOG_INFO, "tcp_server: Got TCP connection from %s.", sipbuf);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user