From: Guilherme Maciel Ferreira Date: Tue, 9 Aug 2011 03:42:36 +0000 (-0300) Subject: Removing warning about conversion from 'int' to 'uint8_t' X-Git-Tag: v1.1^2~24 X-Git-Url: http://developer.intra2net.com/git/?a=commitdiff_plain;h=cfa65ad822c8f633da8a684e9e6108626dd3b1b3;p=pingcheck Removing warning about conversion from 'int' to 'uint8_t' --- 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 )