[Spice-devel] [PATCH spice-server 11/23] websocket: Better variable types
Frediano Ziglio
fziglio at redhat.com
Tue Jun 25 16:11:35 UTC 2019
"type" is just 8 bit.
"frame_ready" and "masked" as booleans.
Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
server/websocket.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/server/websocket.c b/server/websocket.c
index 9a9400375..38496fb5a 100644
--- a/server/websocket.c
+++ b/server/websocket.c
@@ -68,11 +68,11 @@
#define WEBSOCKET_MAX_HEADER_SIZE (1 + 9 + 4)
typedef struct {
- int type;
- int masked;
+ uint8_t type;
uint8_t header[WEBSOCKET_MAX_HEADER_SIZE];
int header_pos;
- int frame_ready:1;
+ bool frame_ready:1;
+ bool masked:1;
uint8_t mask[4];
uint64_t relayed;
uint64_t expected_len;
--
2.20.1
More information about the Spice-devel
mailing list