[Spice-devel] [PATCH spice-server 08/30] Remove useless check
Frediano Ziglio
fziglio at redhat.com
Mon Nov 21 12:51:55 UTC 2016
Already limited using MIN statement.
---
server/websocket.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/server/websocket.c b/server/websocket.c
index 8e6166f..d35a892 100644
--- a/server/websocket.c
+++ b/server/websocket.c
@@ -209,7 +209,7 @@ static int relay_data(guint8* buf, size_t size, websocket_frame_t *frame)
int n = MIN(size, frame->expected_len - frame->relayed);
if (frame->masked) {
- for (i = 0; i < n && frame->relayed < frame->expected_len; i++, frame->relayed++)
+ for (i = 0; i < n; i++, frame->relayed++)
*buf++ ^= frame->mask[frame->relayed % 4];
}
--
2.7.4
More information about the Spice-devel
mailing list