From: Paul Durrant Date: Wed, 11 Mar 2015 17:14:45 +0000 (+0000) Subject: Squash a prefast warning X-Git-Tag: 8.1.0-rc1~46 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=83d76b92d51c103876be27164ab990d77a410bb1;p=pvdrivers%2Fwin%2Fxenbus.git Squash a prefast warning 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 --- diff --git a/src/xenbus/evtchn.c b/src/xenbus/evtchn.c index 3bb8d18..499127a 100644 --- a/src/xenbus/evtchn.c +++ b/src/xenbus/evtchn.c @@ -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);