[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[win-pv-devel] [PATCH] A single queue to the backend should imply and index of 0



There is no need to test for both so change the extra test into an
assertion.

Signed-off-by: Paul Durrant <paul.durrant@xxxxxxxxxx>
---
 src/xenvif/receiver.c    | 3 ++-
 src/xenvif/transmitter.c | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/xenvif/receiver.c b/src/xenvif/receiver.c
index a53a03f..e64c942 100644
--- a/src/xenvif/receiver.c
+++ b/src/xenvif/receiver.c
@@ -2297,7 +2297,8 @@ __ReceiverRingStoreWrite(
     Receiver = Ring->Receiver;
     Frontend = Receiver->Frontend;
 
-    Path = (FrontendGetQueueCount(Frontend) == 1 && Ring->Index == 0) ?
+    ASSERT(IMPLY(FrontendGetQueueCount(Frontend) == 1, Ring->Index == 0));
+    Path = (FrontendGetQueueCount(Frontend) == 1) ?
                     FrontendGetPath(Frontend) :
                     Ring->Path;
 
diff --git a/src/xenvif/transmitter.c b/src/xenvif/transmitter.c
index aa55f1c..bdf1b44 100644
--- a/src/xenvif/transmitter.c
+++ b/src/xenvif/transmitter.c
@@ -3133,7 +3133,8 @@ __TransmitterRingStoreWrite(
     Transmitter = Ring->Transmitter;
     Frontend = Transmitter->Frontend;
 
-    Path = (FrontendGetQueueCount(Frontend) == 1 && Ring->Index == 0) ?
+    ASSERT(IMPLY(FrontendGetQueueCount(Frontend) == 1, Ring->Index == 0));
+    Path = (FrontendGetQueueCount(Frontend) == 1) ?
                     FrontendGetPath(Frontend) :
                     Ring->Path;
 
-- 
2.1.1


_______________________________________________
win-pv-devel mailing list
win-pv-devel@xxxxxxxxxxxxxxxxxxxx
http://lists.xenproject.org/cgi-bin/mailman/listinfo/win-pv-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.