[bgp/prefix] Minor style improvement

This commit is contained in:
Lorenzo Cogotti 2021-06-08 11:07:23 +02:00
parent 31d0c806be
commit 26996e1a8a
1 changed files with 5 additions and 10 deletions

View File

@ -133,14 +133,10 @@ Judgement Bgp_StartPrefixes(Prefixiter *it,
size_t nbytes, size_t nbytes,
Boolean isAddPath) Boolean isAddPath)
{ {
if (afi != AFI_IP && afi != AFI_IP6) { if (afi != AFI_IP && afi != AFI_IP6)
Bgp_SetErrStat(BGPEAFIUNSUP); return Bgp_SetErrStat(BGPEAFIUNSUP);
return NG; if (safi != SAFI_UNICAST && safi != SAFI_MULTICAST)
} return Bgp_SetErrStat(BGPESAFIUNSUP);
if (safi != SAFI_UNICAST && safi != SAFI_MULTICAST) {
Bgp_SetErrStat(BGPESAFIUNSUP);
return NG;
}
it->afi = afi; it->afi = afi;
it->safi = safi; it->safi = safi;
@ -149,8 +145,7 @@ Judgement Bgp_StartPrefixes(Prefixiter *it,
it->lim = it->base + nbytes; it->lim = it->base + nbytes;
it->ptr = it->base; it->ptr = it->base;
Bgp_SetErrStat(BGPENOERR); return Bgp_SetErrStat(BGPENOERR);
return OK;
} }
void *Bgp_NextPrefix(Prefixiter *it) void *Bgp_NextPrefix(Prefixiter *it)