]> xenbits.xensource.com Git - people/pauldu/xenvif.git/commitdiff
A single queue to the backend should imply and index of 0
authorPaul Durrant <paul.durrant@citrix.com>
Tue, 3 Feb 2015 10:20:55 +0000 (10:20 +0000)
committerPaul Durrant <paul.durrant@citrix.com>
Tue, 3 Feb 2015 10:22:01 +0000 (10:22 +0000)
There is no need to test for both so change the extra test into an
assertion.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
src/xenvif/receiver.c
src/xenvif/transmitter.c

index a53a03ff78c7a47e7be2261f5434ffd5cd4ff664..e64c94299bf55f02b27dba0f380fd25973b8a865 100644 (file)
@@ -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;
 
index aa55f1c8ad564a57c28ac2237f6d97ee41a9c680..bdf1b442363ead5c123549ba20c4d28e668d3cd5 100644 (file)
@@ -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;