add assert logic to avoid Klocwork fake report

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7511 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
eric_tian
2009-02-12 06:23:15 +00:00
parent c55426ab64
commit a1b749d074
3 changed files with 18 additions and 6 deletions

View File

@@ -928,6 +928,7 @@ MatchUsbClass (
}
IfDesc = UsbIf->IfDesc;
ASSERT (IfDesc->ActiveIndex < USB_MAX_INTERFACE_SETTING);
ActIfDesc = &(IfDesc->Settings[IfDesc->ActiveIndex]->Desc);
DevDesc = &(UsbIf->Device->DevDesc->Desc);
@@ -1008,6 +1009,7 @@ MatchUsbWwid (
}
IfDesc = UsbIf->IfDesc;
ASSERT (IfDesc->ActiveIndex < USB_MAX_INTERFACE_SETTING);
ActIfDesc = &(IfDesc->Settings[IfDesc->ActiveIndex]->Desc);
DevDesc = &(UsbIf->Device->DevDesc->Desc);
StrDesc = UsbGetOneString (UsbIf->Device, DevDesc->StrSerialNumber, USB_US_LAND_ID);