]> xenbits.xensource.com Git - pvdrivers/win/xenbus.git/commitdiff
Squash a prefast warning
authorPaul Durrant <paul.durrant@citrix.com>
Wed, 11 Mar 2015 17:14:45 +0000 (17:14 +0000)
committerPaul Durrant <paul.durrant@citrix.com>
Thu, 12 Mar 2015 11:14:01 +0000 (11:14 +0000)
Prefast warns that following the Flink pointer of the EVTCHN context list
may be unsafe due to it being NULL. It should never be NULL so this patch
adds an ASSERTion and hence squashes the warning.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
src/xenbus/evtchn.c

index 3bb8d18ac5e4f5b15b751489fc4ff7d89c7ca356..499127aae3ad71ac8cc26a6170b83c753b1e7440 100644 (file)
@@ -995,6 +995,8 @@ EvtchnSuspendCallbackEarly(
          ListEntry = ListEntry->Flink) {
         PXENBUS_EVTCHN_CHANNEL  Channel;
 
+        ASSERT(ListEntry->Flink != NULL);
+
         Channel = CONTAINING_RECORD(ListEntry, XENBUS_EVTCHN_CHANNEL, ListEntry);
 
         ASSERT3U(Channel->Magic, ==, XENBUS_EVTCHN_CHANNEL_MAGIC);