[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [win-pv-devel] [PATCH 1/3] Fix a stupid if-then-else
Signed-off-by: Paul Durrant <paul.durrant@xxxxxxxxxx> --- src/xenvif/receiver.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/src/xenvif/receiver.c b/src/xenvif/receiver.c index 88ee07c..c7510ce 100644 --- a/src/xenvif/receiver.c +++ b/src/xenvif/receiver.c @@ -467,6 +467,7 @@ ReceiverRingProcessChecksum( } flags = (uint16_t)(ULONG_PTR)Packet->Cookie; + ASSERT3U(Packet->Flags.Value, ==, 0); if (Info->IpHeader.Length == 0) return; @@ -537,17 +538,10 @@ ReceiverRingProcessChecksum( Calculated = ChecksumPseudoHeader(StartVa, Info); Calculated = ChecksumTcpPacket(StartVa, Info, Calculated, &Payload); - if (IpHeader->Version == 4) { - if (ChecksumVerify(Calculated, Embedded)) - Packet->Flags.TcpChecksumSucceeded = 1; - else - Packet->Flags.TcpChecksumFailed = 1; - } else { - if (ChecksumVerify(Calculated, Embedded)) - Packet->Flags.TcpChecksumSucceeded = 1; - else - Packet->Flags.TcpChecksumFailed = 1; - } + if (ChecksumVerify(Calculated, Embedded)) + Packet->Flags.TcpChecksumSucceeded = 1; + else + Packet->Flags.TcpChecksumFailed = 1; } } -- 2.1.1 _______________________________________________ win-pv-devel mailing list win-pv-devel@xxxxxxxxxxxxxxxxxxxx http://lists.xenproject.org/cgi-bin/mailman/listinfo/win-pv-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |