diff options
| author | Sebastien Bacher <seb128@ubuntu.com> | 2020-07-02 11:35:14 +0200 |
|---|---|---|
| committer | Sebastien Bacher <seb128@ubuntu.com> | 2020-07-02 11:52:25 +0200 |
| commit | c6c4e39b012d544c1f1ed816686c8ae1599da793 (patch) | |
| tree | 094d5e07c1d135d0ee67d99e051fd6a9a367a6a4 /shared/n-acd | |
| parent | 7368e45ff5b3b8b328d55408bcd403e4d6c564d0 (diff) | |
| parent | acd7b014c72673f5b0c0b91309e27028886da167 (diff) | |
Merge remote-tracking branch 'salsa/debian/master' into ubuntu/master
Diffstat (limited to 'shared/n-acd')
| -rw-r--r-- | shared/n-acd/src/n-acd.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/shared/n-acd/src/n-acd.c b/shared/n-acd/src/n-acd.c index d434d1d1..af3328c1 100644 --- a/shared/n-acd/src/n-acd.c +++ b/shared/n-acd/src/n-acd.c @@ -328,6 +328,7 @@ int n_acd_ensure_bpf_map_space(NAcd *acd) { _c_public_ int n_acd_new(NAcd **acdp, NAcdConfig *config) { _c_cleanup_(n_acd_unrefp) NAcd *acd = NULL; _c_cleanup_(c_closep) int fd_bpf_prog = -1; + struct epoll_event eevent; int r; if (config->ifindex <= 0 || @@ -370,19 +371,19 @@ _c_public_ int n_acd_new(NAcd **acdp, NAcdConfig *config) { if (r) return r; - r = epoll_ctl(acd->fd_epoll, EPOLL_CTL_ADD, acd->timer.fd, - &(struct epoll_event){ - .events = EPOLLIN, - .data.u32 = N_ACD_EPOLL_TIMER, - }); + eevent = (struct epoll_event){ + .events = EPOLLIN, + .data.u32 = N_ACD_EPOLL_TIMER, + }; + r = epoll_ctl(acd->fd_epoll, EPOLL_CTL_ADD, acd->timer.fd, &eevent); if (r < 0) return -c_errno(); - r = epoll_ctl(acd->fd_epoll, EPOLL_CTL_ADD, acd->fd_socket, - &(struct epoll_event){ - .events = EPOLLIN, - .data.u32 = N_ACD_EPOLL_SOCKET, - }); + eevent = (struct epoll_event){ + .events = EPOLLIN, + .data.u32 = N_ACD_EPOLL_SOCKET, + }; + r = epoll_ctl(acd->fd_epoll, EPOLL_CTL_ADD, acd->fd_socket, &eevent); if (r < 0) return -c_errno(); |