[vm.c,vm_asmtch.c] Move match result PUSH to Bgp_VmStoreMsgTypeMatch()

This commit is contained in:
Lorenzo Cogotti 2021-06-08 00:01:50 +02:00
parent 3bf9ff9dc4
commit 739f798d11
2 changed files with 2 additions and 4 deletions

View File

@ -331,6 +331,8 @@ cant_run:
Judgement Bgp_VmStoreMsgTypeMatch(Bgpvm *vm, Boolean isMatching) Judgement Bgp_VmStoreMsgTypeMatch(Bgpvm *vm, Boolean isMatching)
{ {
BGP_VMPUSH(vm, isMatching);
vm->curMatch = (Bgpvmmatch *) Bgp_VmTempAlloc(vm, sizeof(*vm->curMatch)); vm->curMatch = (Bgpvmmatch *) Bgp_VmTempAlloc(vm, sizeof(*vm->curMatch));
if (!vm->curMatch) UNLIKELY if (!vm->curMatch) UNLIKELY
return NG; return NG;
@ -462,8 +464,6 @@ void Bgp_VmDoChkt(Bgpvm *vm, BgpType type)
return; return;
Boolean isMatching = (BGP_VMCHKMSGTYPE(vm, type) != NULL); Boolean isMatching = (BGP_VMCHKMSGTYPE(vm, type) != NULL);
BGP_VMPUSH(vm, isMatching);
Bgp_VmStoreMsgTypeMatch(vm, isMatching); Bgp_VmStoreMsgTypeMatch(vm, isMatching);
} }

View File

@ -766,7 +766,6 @@ void Bgp_VmDoAsmtch(Bgpvm *vm)
} }
if (!BGP_VMCHKMSGTYPE(vm, BGP_UPDATE)) { if (!BGP_VMCHKMSGTYPE(vm, BGP_UPDATE)) {
Bgp_VmStoreMsgTypeMatch(vm, /*isMatching=*/FALSE); Bgp_VmStoreMsgTypeMatch(vm, /*isMatching=*/FALSE);
BGP_VMPUSH(vm, FALSE);
return; return;
} }
@ -821,7 +820,6 @@ void Bgp_VmDoFasmtc(Bgpvm *vm)
} }
if (!BGP_VMCHKMSGTYPE(vm, BGP_UPDATE)) { if (!BGP_VMCHKMSGTYPE(vm, BGP_UPDATE)) {
Bgp_VmStoreMsgTypeMatch(vm, /*isMatching=*/FALSE); Bgp_VmStoreMsgTypeMatch(vm, /*isMatching=*/FALSE);
BGP_VMPUSH(vm, FALSE);
return; return;
} }