diff options
author | Frank Meerkoetter <frank.meerkoetter@basyskom.com> | 2016-04-04 19:04:39 +0200 |
---|---|---|
committer | Frank Meerkoetter <frank.meerkoetter@basyskom.com> | 2016-04-07 07:49:52 +0000 |
commit | 268f11eee050f4f8bca347eb469d5b0c26eded3b (patch) | |
tree | 2cdd16e16f937da13c8b71ff8a0b257b4f3660c6 /src | |
parent | 250c96f7bcaed7a9d596c69dcb93c297127819bf (diff) | |
download | qtwebsockets-268f11eee050f4f8bca347eb469d5b0c26eded3b.tar.gz |
Limit variable scope
Change-Id: I8930d132cfcf09edeaa30bb052d9ea0a5ee47a98
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/websockets/qwebsocket_p.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/websockets/qwebsocket_p.cpp b/src/websockets/qwebsocket_p.cpp index 0bc4486..d700adc 100644 --- a/src/websockets/qwebsocket_p.cpp +++ b/src/websockets/qwebsocket_p.cpp @@ -693,12 +693,11 @@ QByteArray QWebSocketPrivate::getFrameHeader(QWebSocketProtocol::OpCode opCode, bool lastFrame) { QByteArray header; - quint8 byte = 0x00; bool ok = payloadLength <= 0x7FFFFFFFFFFFFFFFULL; if (Q_LIKELY(ok)) { //FIN, RSV1-3, opcode (RSV-1, RSV-2 and RSV-3 are zero) - byte = static_cast<quint8>((opCode & 0x0F) | (lastFrame ? 0x80 : 0x00)); + quint8 byte = static_cast<quint8>((opCode & 0x0F) | (lastFrame ? 0x80 : 0x00)); header.append(static_cast<char>(byte)); byte = 0x00; |