Use NULL for pointers
This commit is contained in:
parent
a664dee4f6
commit
ec4b4d979f
@ -76,7 +76,8 @@ struct conn_s *initialize_conn (int client_fd, const char *ipaddr,
|
|||||||
/* There is _no_ content length initially */
|
/* There is _no_ content length initially */
|
||||||
connptr->content_length.server = connptr->content_length.client = -1;
|
connptr->content_length.server = connptr->content_length.client = -1;
|
||||||
|
|
||||||
connptr->server_ip_addr = sock_ipaddr ? safestrdup (sock_ipaddr) : 0;
|
connptr->server_ip_addr = (sock_ipaddr ?
|
||||||
|
safestrdup (sock_ipaddr) : NULL);
|
||||||
connptr->client_ip_addr = safestrdup (ipaddr);
|
connptr->client_ip_addr = safestrdup (ipaddr);
|
||||||
connptr->client_string_addr = safestrdup (string_addr);
|
connptr->client_string_addr = safestrdup (string_addr);
|
||||||
|
|
||||||
|
@ -1558,7 +1558,7 @@ void handle_connection (int fd)
|
|||||||
fd, peer_string, peer_ipaddr, sock_ipaddr);
|
fd, peer_string, peer_ipaddr, sock_ipaddr);
|
||||||
|
|
||||||
connptr = initialize_conn (fd, peer_ipaddr, peer_string,
|
connptr = initialize_conn (fd, peer_ipaddr, peer_string,
|
||||||
config.bindsame ? sock_ipaddr : 0);
|
config.bindsame ? sock_ipaddr : NULL);
|
||||||
if (!connptr) {
|
if (!connptr) {
|
||||||
close (fd);
|
close (fd);
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user