[Spice-devel] [PATCH spice-server 06/30] Don't use literal 125 constant as confusing
Frediano Ziglio
fziglio at redhat.com
Mon Nov 21 12:51:53 UTC 2016
Considering other way to encoding dynamic length 125 is confusing
and it's easy to believe it's just a typo for 127.
---
server/websocket.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/server/websocket.c b/server/websocket.c
index 34a3448..3df1ee6 100644
--- a/server/websocket.c
+++ b/server/websocket.c
@@ -283,9 +283,7 @@ static int fill_header(guint8 *header, guint64 len)
len >>= 8;
}
used += 8;
- }
-
- else if (len > 125) {
+ } else if (len >= LENGTH_16BIT) {
header[1] |= LENGTH_16BIT;
header[2] = len >> 8;
header[3] = len & 0xFF;
--
2.7.4
More information about the Spice-devel
mailing list