Changeset View
Changeset View
Standalone View
Standalone View
head/sys/boot/ficl/ficl.c
Show First 20 Lines • Show All 270 Lines • ▼ Show 20 Lines | |||||
** will do this cleanup for you. This function is handy if you're going to | ** will do this cleanup for you. This function is handy if you're going to | ||||
** do a lot of dynamic creation of VMs. | ** do a lot of dynamic creation of VMs. | ||||
**************************************************************************/ | **************************************************************************/ | ||||
void ficlFreeVM(FICL_VM *pVM) | void ficlFreeVM(FICL_VM *pVM) | ||||
{ | { | ||||
FICL_SYSTEM *pSys = pVM->pSys; | FICL_SYSTEM *pSys = pVM->pSys; | ||||
FICL_VM *pList = pSys->vmList; | FICL_VM *pList = pSys->vmList; | ||||
assert(pVM != 0); | assert(pVM != NULL); | ||||
if (pSys->vmList == pVM) | if (pSys->vmList == pVM) | ||||
{ | { | ||||
pSys->vmList = pSys->vmList->link; | pSys->vmList = pSys->vmList->link; | ||||
} | } | ||||
else for (; pList != NULL; pList = pList->link) | else for (; pList != NULL; pList = pList->link) | ||||
{ | { | ||||
if (pList->link == pVM) | if (pList->link == pVM) | ||||
▲ Show 20 Lines • Show All 409 Lines • Show Last 20 Lines |