Removing warning about conversion from 'int' to 'uint8_t'
authorGuilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
Tue, 9 Aug 2011 03:42:36 +0000 (00:42 -0300)
committerGuilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
Tue, 9 Aug 2011 03:42:36 +0000 (00:42 -0300)
src/tcp/tcpheader.cpp

index f1cb206..20f1d2b 100644 (file)
@@ -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 )