From 44e756a8758035546f47dd02320395c527d26634 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sun, 29 May 2016 08:22:23 -0700 Subject: Use width of 8 for struct dgram boolean bitfields. * socket.c (struct dgram): Members is_connected and is_byte_oriented widened from 1 to 8 bits. This allows byte-access instructions to be used on architectures like x86. All the flags still fit into a word, so the structure doesn't get bigger. --- socket.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'socket.c') diff --git a/socket.c b/socket.c index c40f01ef..568de50e 100644 --- a/socket.c +++ b/socket.c @@ -69,8 +69,8 @@ struct dgram_stream { mem_t *tx_buf; int rx_max, rx_size, rx_pos; int tx_pos; - unsigned is_connected : 1; - unsigned is_byte_oriented : 1; + unsigned is_connected : 8; + unsigned is_byte_oriented : 8; }; val sockaddr_in_s, sockaddr_in6_s, sockaddr_un_s, addrinfo_s; -- cgit v1.2.3