From cfa65ad822c8f633da8a684e9e6108626dd3b1b3 Mon Sep 17 00:00:00 2001 From: Guilherme Maciel Ferreira Date: Tue, 9 Aug 2011 00:42:36 -0300 Subject: [PATCH] Removing warning about conversion from 'int' to 'uint8_t' --- src/tcp/tcpheader.cpp | 16 ++++++++-------- 1 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/tcp/tcpheader.cpp b/src/tcp/tcpheader.cpp index f1cb206..20f1d2b 100644 --- a/src/tcp/tcpheader.cpp +++ b/src/tcp/tcpheader.cpp @@ -202,42 +202,42 @@ void TcpHeader::header_length( const uint8_t offset ) void TcpHeader::congestion_window_reduced( bool bit ) { - rep_[13] |= bit ? 0x80 : 0x0; + rep_[13] = rep_[13] | bit ? 0x80 : 0x0; } void TcpHeader::ecn_echo( bool bit ) { - rep_[13] |= bit ? 0x40 : 0x0; + rep_[13] = rep_[13] | bit ? 0x40 : 0x0; } void TcpHeader::urgent( bool bit ) { - rep_[13] |= bit ? 0x20 : 0x0; + rep_[13] = rep_[13] | bit ? 0x20 : 0x0; } void TcpHeader::acknowledgment( bool bit ) { - rep_[13] |= bit ? 0x10 : 0x0; + rep_[13] = rep_[13] | bit ? 0x10 : 0x0; } void TcpHeader::push( bool bit ) { - rep_[13] |= bit ? 0x08 : 0x0; + rep_[13] = rep_[13] | bit ? 0x08 : 0x0; } void TcpHeader::reset( bool bit ) { - rep_[13] |= bit ? 0x04 : 0x0; + rep_[13] = rep_[13] | bit ? 0x04 : 0x0; } void TcpHeader::synchronize( bool bit ) { - rep_[13] |= bit ? 0x02 : 0x0; + rep_[13] = rep_[13] | bit ? 0x02 : 0x0; } void TcpHeader::finish( bool bit ) { - rep_[13] |= bit ? 0x01 : 0x0; + rep_[13] = rep_[13] | bit ? 0x01 : 0x0; } void TcpHeader::window_size( const uint16_t wnd_size ) -- 1.7.1