summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2016-05-29 08:22:23 -0700
committerKaz Kylheku <kaz@kylheku.com>2016-05-29 08:22:23 -0700
commitef1ec0e05557607b4540ac1bb8f9f672a6f633b0 (patch)
tree7972544d3ffb4d303a231036f500b507ac3231b4
parent9272e2c09598b522d3d635f0387903b0f2c0e6f4 (diff)
downloadtxr-ef1ec0e05557607b4540ac1bb8f9f672a6f633b0.tar.gz
txr-ef1ec0e05557607b4540ac1bb8f9f672a6f633b0.tar.bz2
txr-ef1ec0e05557607b4540ac1bb8f9f672a6f633b0.zip
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.
-rw-r--r--socket.c4
1 files changed, 2 insertions, 2 deletions
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;