summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-04-23 22:11:13 +0200
committerLennart Poettering <lennart@poettering.net>2010-04-23 22:11:13 +0200
commitcabab516b38fbb2146bb62980b6770b1f70403fa (patch)
tree2b589e1b9a544f41a93e58a0b2f4a99d865b2aca
parentdd5ad9d4e6f98b273150042f8facd41d76830923 (diff)
socket: fix bitfields in fd watches
-rw-r--r--manager.h4
-rw-r--r--socket.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/manager.h b/manager.h
index a6c330ae21..3790cfd281 100644
--- a/manager.h
+++ b/manager.h
@@ -71,9 +71,9 @@ struct Watch {
union Unit *unit;
DBusWatch *bus_watch;
DBusTimeout *bus_timeout;
- bool socket_accept;
} data;
- bool fd_is_dupped;
+ bool fd_is_dupped:1;
+ bool socket_accept:1;
};
#include "unit.h"
diff --git a/socket.c b/socket.c
index b517344e70..cb065b75bf 100644
--- a/socket.c
+++ b/socket.c
@@ -453,7 +453,7 @@ static int socket_watch_fds(Socket *s) {
if (p->fd < 0)
continue;
- p->fd_watch.data.socket_accept =
+ p->fd_watch.socket_accept =
s->accept &&
p->type == SOCKET_SOCKET &&
socket_address_can_accept(&p->address);
@@ -1094,7 +1094,7 @@ static void socket_fd_event(Unit *u, int fd, uint32_t events, Watch *w) {
goto fail;
}
- if (w->data.socket_accept) {
+ if (w->socket_accept) {
for (;;) {
if ((cfd = accept4(fd, NULL, NULL, SOCK_NONBLOCK)) < 0) {