Skip to content

Commit

Permalink
responder: fix warning in activate_unix_sockets
Browse files Browse the repository at this point in the history
The warning is with systemd disabled.

```
src/responder/common/responder_common.c: In function ‘activate_unix_sockets’:
src/responder/common/responder_common.c:1005:15: error: unused variable ‘sockaddr_len’ [-Werror=unused-variable]
 1005 |     socklen_t sockaddr_len = sizeof(sockaddr);
```

Reviewed-by: Alexey Tikhonov <[email protected]>
  • Loading branch information
pbrezina committed Feb 19, 2021
1 parent f890fc4 commit 50e3221
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/responder/common/responder_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -1001,10 +1001,11 @@ int activate_unix_sockets(struct resp_ctx *rctx,
connection_setup_t conn_setup)
{
int ret;

#ifdef HAVE_SYSTEMD
struct sockaddr_un sockaddr;
socklen_t sockaddr_len = sizeof(sockaddr);

#ifdef HAVE_SYSTEMD
if (rctx->lfd == -1 && rctx->priv_lfd == -1) {
int numfds = (rctx->sock_name ? 1 : 0)
+ (rctx->priv_sock_name ? 1 : 0);
Expand Down

0 comments on commit 50e3221

Please sign in to comment.