diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2020-03-21 12:39:30 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-03-21 12:39:30 -0400 |
| commit | 2ecb6952ef9ab72f5d107140d4d3849a30ecc45f (patch) | |
| tree | 3040e26567e9fb5e2af76f6f0e0a24b7cf29d3a8 /bgpd/bgp_flowspec_util.c | |
| parent | 07ab06a8ce629ff813a29f72a2cad200dab3552d (diff) | |
| parent | 3dc339cdc2686a1fe6008acd827f9f5ba11a9fed (diff) | |
Merge pull request #6059 from ton31337/fix/int_to_bool
bgpd: Convert lots of int type functions to bool/void
Diffstat (limited to 'bgpd/bgp_flowspec_util.c')
| -rw-r--r-- | bgpd/bgp_flowspec_util.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/bgpd/bgp_flowspec_util.c b/bgpd/bgp_flowspec_util.c index 002aae561a..c117d08bfb 100644 --- a/bgpd/bgp_flowspec_util.c +++ b/bgpd/bgp_flowspec_util.c @@ -599,8 +599,8 @@ int bgp_flowspec_match_rules_fill(uint8_t *nlri_content, int len, } /* return 1 if FS entry invalid or no NH IP */ -int bgp_flowspec_get_first_nh(struct bgp *bgp, struct bgp_path_info *pi, - struct prefix *p) +bool bgp_flowspec_get_first_nh(struct bgp *bgp, struct bgp_path_info *pi, + struct prefix *p) { struct bgp_pbr_entry_main api; int i; @@ -609,7 +609,7 @@ int bgp_flowspec_get_first_nh(struct bgp *bgp, struct bgp_path_info *pi, memset(&api, 0, sizeof(struct bgp_pbr_entry_main)); if (bgp_pbr_build_and_validate_entry(&rn->p, pi, &api) < 0) - return 1; + return true; for (i = 0; i < api.action_num; i++) { api_action = &api.actions[i]; if (api_action->action != ACTION_REDIRECT_IP) @@ -617,7 +617,7 @@ int bgp_flowspec_get_first_nh(struct bgp *bgp, struct bgp_path_info *pi, p->family = AF_INET; p->prefixlen = IPV4_MAX_BITLEN; p->u.prefix4 = api_action->u.zr.redirect_ip_v4; - return 0; + return false; } - return 1; + return true; } |
