Browse Source

[build] avoid accept_filter_arg compiler warning

avoid compiler warning for struct accept_filter_arg af_name strncpy()
master
Glenn Strauss 1 year ago
parent
commit
eb4f953396
  1. 2
      src/network.c

2
src/network.c

@ -401,7 +401,7 @@ static int network_server_init(server *srv, network_socket_config *s, buffer *ho
/* FreeBSD accf_http filter */
struct accept_filter_arg afa;
memset(&afa, 0, sizeof(afa));
strncpy(afa.af_name, s->bsd_accept_filter->ptr, sizeof(afa.af_name));
strncpy(afa.af_name, s->bsd_accept_filter->ptr, sizeof(afa.af_name)-1);
if (setsockopt(srv_socket->fd, SOL_SOCKET, SO_ACCEPTFILTER, &afa, sizeof(afa)) < 0) {
if (errno != ENOENT) {
log_perror(srv->errh, __FILE__, __LINE__,

Loading…
Cancel
Save