bgpd: Return bool type for ecommunity_add_val and subgroup_announce_check

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
This commit is contained in:
Donatas Abraitis 2020-07-02 11:08:29 +03:00
parent 71be4bd9ab
commit acf6f22d15
2 changed files with 4 additions and 4 deletions

View File

@ -107,14 +107,14 @@ bool ecommunity_add_val(struct ecommunity *ecom, struct ecommunity_val *eval,
p[1] == eval->val[1]) {
if (overwrite) {
memcpy(p, eval->val, ECOMMUNITY_SIZE);
return 1;
return true;
}
return 0;
return false;
}
}
int ret = memcmp(p, eval->val, ECOMMUNITY_SIZE);
if (ret == 0)
return 0;
return false;
if (ret > 0) {
if (!unique)
break;

View File

@ -1941,7 +1941,7 @@ bool subgroup_announce_check(struct bgp_node *rn, struct bgp_path_info *pi,
/* Codification of AS 0 Processing */
if (aspath_check_as_zero(attr->aspath))
return 0;
return false;
if (CHECK_FLAG(bgp->flags, BGP_FLAG_GRACEFUL_SHUTDOWN)) {
if (peer->sort == BGP_PEER_IBGP