Skip to content

Commit

Permalink
*: s/TRUE/true/, s/FALSE/false/
Browse files Browse the repository at this point in the history
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
  • Loading branch information
qlyoung committed Jul 1, 2019
1 parent f3afd0a commit 2951a7a
Show file tree
Hide file tree
Showing 27 changed files with 123 additions and 128 deletions.
2 changes: 1 addition & 1 deletion bgpd/bgp_nht.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ int bgp_find_or_add_nexthop(struct bgp *bgp_route, struct bgp *bgp_nexthop,
afi = BGP_ATTR_NEXTHOP_AFI_IP6(pi->attr) ? AFI_IP6
: AFI_IP;

/* This will return TRUE if the global IPv6 NH is a link local
/* This will return true if the global IPv6 NH is a link local
* addr */
if (make_prefix(afi, pi, &p) < 0)
return 1;
Expand Down
4 changes: 2 additions & 2 deletions bgpd/bgp_routemap.c
Original file line number Diff line number Diff line change
Expand Up @@ -2695,11 +2695,11 @@ route_set_ipv6_nexthop_prefer_global(void *rule, const struct prefix *prefix,
&& peer->su_remote
&& sockunion_family(peer->su_remote) == AF_INET6) {
/* Set next hop preference to global */
path->attr->mp_nexthop_prefer_global = TRUE;
path->attr->mp_nexthop_prefer_global = true;
SET_FLAG(path->attr->rmap_change_flags,
BATTR_RMAP_IPV6_PREFER_GLOBAL_CHANGED);
} else {
path->attr->mp_nexthop_prefer_global = FALSE;
path->attr->mp_nexthop_prefer_global = false;
SET_FLAG(path->attr->rmap_change_flags,
BATTR_RMAP_IPV6_PREFER_GLOBAL_CHANGED);
}
Expand Down
12 changes: 6 additions & 6 deletions bgpd/bgp_updgrp.c
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,7 @@ void update_subgroup_inherit_info(struct update_subgroup *to,
*
* Delete a subgroup if it is ready to be deleted.
*
* Returns TRUE if the subgroup was deleted.
* Returns true if the subgroup was deleted.
*/
static int update_subgroup_check_delete(struct update_subgroup *subgrp)
{
Expand Down Expand Up @@ -979,7 +979,7 @@ static struct update_subgroup *update_subgroup_find(struct update_group *updgrp,
/*
* update_subgroup_ready_for_merge
*
* Returns TRUE if this subgroup is in a state that allows it to be
* Returns true if this subgroup is in a state that allows it to be
* merged into another subgroup.
*/
static int update_subgroup_ready_for_merge(struct update_subgroup *subgrp)
Expand Down Expand Up @@ -1012,7 +1012,7 @@ static int update_subgroup_ready_for_merge(struct update_subgroup *subgrp)
/*
* update_subgrp_can_merge_into
*
* Returns TRUE if the first subgroup can merge into the second
* Returns true if the first subgroup can merge into the second
* subgroup.
*/
static int update_subgroup_can_merge_into(struct update_subgroup *subgrp,
Expand Down Expand Up @@ -1092,7 +1092,7 @@ static void update_subgroup_merge(struct update_subgroup *subgrp,
*
* Merge this subgroup into another subgroup if possible.
*
* Returns TRUE if the subgroup has been merged. The subgroup pointer
* Returns true if the subgroup has been merged. The subgroup pointer
* should not be accessed in this case.
*/
int update_subgroup_check_merge(struct update_subgroup *subgrp,
Expand Down Expand Up @@ -1141,7 +1141,7 @@ static int update_subgroup_merge_check_thread_cb(struct thread *thread)
* @param force If true, the merge check will be triggered even if the
* subgroup doesn't currently look ready for a merge.
*
* Returns TRUE if a merge check will be performed shortly.
* Returns true if a merge check will be performed shortly.
*/
int update_subgroup_trigger_merge_check(struct update_subgroup *subgrp,
int force)
Expand Down Expand Up @@ -1788,7 +1788,7 @@ int update_group_refresh_default_originate_route_map(struct thread *thread)
*
* Refreshes routes out to a peer_af immediately.
*
* If the combine parameter is TRUE, then this function will try to
* If the combine parameter is true, then this function will try to
* gather other peers in the subgroup for which a route announcement
* is pending and efficently announce routes to all of them.
*
Expand Down
30 changes: 15 additions & 15 deletions bgpd/bgpd.c
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,9 @@ static int bgp_router_id_set(struct bgp *bgp, const struct in_addr *id,

/* EVPN uses router id in RD, withdraw them */
if (is_evpn_enabled())
bgp_evpn_handle_router_id_update(bgp, TRUE);
bgp_evpn_handle_router_id_update(bgp, true);

vpn_handle_router_id_update(bgp, TRUE, is_config);
vpn_handle_router_id_update(bgp, true, is_config);

IPV4_ADDR_COPY(&bgp->router_id, id);

Expand All @@ -267,9 +267,9 @@ static int bgp_router_id_set(struct bgp *bgp, const struct in_addr *id,

/* EVPN uses router id in RD, update them */
if (is_evpn_enabled())
bgp_evpn_handle_router_id_update(bgp, FALSE);
bgp_evpn_handle_router_id_update(bgp, false);

vpn_handle_router_id_update(bgp, FALSE, is_config);
vpn_handle_router_id_update(bgp, false, is_config);

return 0;
}
Expand Down Expand Up @@ -303,7 +303,7 @@ void bgp_router_id_zebra_bump(vrf_id_t vrf_id, const struct prefix *router_id)
if (BGP_DEBUG(zebra, ZEBRA))
zlog_debug("RID change : vrf %u, RTR ID %s",
bgp->vrf_id, inet_ntoa(*addr));
bgp_router_id_set(bgp, addr, FALSE);
bgp_router_id_set(bgp, addr, false);
}
}
}
Expand All @@ -323,7 +323,7 @@ void bgp_router_id_zebra_bump(vrf_id_t vrf_id, const struct prefix *router_id)
if (BGP_DEBUG(zebra, ZEBRA))
zlog_debug("RID change : vrf %u, RTR ID %s",
bgp->vrf_id, inet_ntoa(*addr));
bgp_router_id_set(bgp, addr, FALSE);
bgp_router_id_set(bgp, addr, false);
}
}

Expand All @@ -335,7 +335,7 @@ int bgp_router_id_static_set(struct bgp *bgp, struct in_addr id)
{
bgp->router_id_static = id;
bgp_router_id_set(bgp, id.s_addr ? &id : &bgp->router_id_zebra,
TRUE /* is config */);
true /* is config */);
return 0;
}

Expand Down Expand Up @@ -3133,7 +3133,7 @@ int bgp_handle_socket(struct bgp *bgp, struct vrf *vrf, vrf_id_t old_vrf_id,
/*
* suppress vrf socket
*/
if (create == FALSE) {
if (create == false) {
bgp_close_vrf_socket(bgp);
return 0;
}
Expand Down Expand Up @@ -3189,7 +3189,7 @@ int bgp_get(struct bgp **bgp_val, as_t *as, const char *name,
bgp = bgp_create(as, name, inst_type);
if (bgp_option_check(BGP_OPT_NO_ZEBRA) && name)
bgp->vrf_id = vrf_generate_id();
bgp_router_id_set(bgp, &bgp->router_id_zebra, TRUE);
bgp_router_id_set(bgp, &bgp->router_id_zebra, true);
bgp_address_init(bgp);
bgp_tip_hash_init(bgp);
bgp_scan_init(bgp);
Expand Down Expand Up @@ -6922,8 +6922,8 @@ static void bgp_config_write_peer_global(struct vty *vty, struct bgp *bgp,
struct peer *g_peer = NULL;
char buf[SU_ADDRSTRLEN];
char *addr;
int if_pg_printed = FALSE;
int if_ras_printed = FALSE;
int if_pg_printed = false;
int if_ras_printed = false;

/* Skip dynamic neighbors. */
if (peer_dynamic_neighbor(peer))
Expand All @@ -6945,16 +6945,16 @@ static void bgp_config_write_peer_global(struct vty *vty, struct bgp *bgp,

if (peer_group_active(peer)) {
vty_out(vty, " peer-group %s", peer->group->name);
if_pg_printed = TRUE;
if_pg_printed = true;
} else if (peer->as_type == AS_SPECIFIED) {
vty_out(vty, " remote-as %u", peer->as);
if_ras_printed = TRUE;
if_ras_printed = true;
} else if (peer->as_type == AS_INTERNAL) {
vty_out(vty, " remote-as internal");
if_ras_printed = TRUE;
if_ras_printed = true;
} else if (peer->as_type == AS_EXTERNAL) {
vty_out(vty, " remote-as external");
if_ras_printed = TRUE;
if_ras_printed = true;
}

vty_out(vty, "\n");
Expand Down
2 changes: 0 additions & 2 deletions eigrpd/eigrp_const.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@
#ifndef _ZEBRA_EIGRP_CONST_H_
#define _ZEBRA_EIGRP_CONST_H_

#define FALSE 0

#define EIGRP_NEIGHBOR_DOWN 0
#define EIGRP_NEIGHBOR_PENDING 1
#define EIGRP_NEIGHBOR_UP 2
Expand Down
4 changes: 2 additions & 2 deletions fpm/fpm.h
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ static inline fpm_msg_hdr_t *fpm_msg_next(fpm_msg_hdr_t *hdr, size_t *len)
/*
* fpm_msg_hdr_ok
*
* Returns TRUE if a message header looks well-formed.
* Returns true if a message header looks well-formed.
*/
static inline int fpm_msg_hdr_ok(const fpm_msg_hdr_t *hdr)
{
Expand All @@ -272,7 +272,7 @@ static inline int fpm_msg_hdr_ok(const fpm_msg_hdr_t *hdr)
/*
* fpm_msg_ok
*
* Returns TRUE if a message looks well-formed.
* Returns true if a message looks well-formed.
*
* @param len The length in bytes from 'hdr' to the end of the buffer.
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/linklist.h
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ extern void list_add_list(struct list *list, struct list *add);
* list
* list to operate on
* cond
* function pointer which takes node data as input and return TRUE or FALSE
* function pointer which takes node data as input and return true or false
*/

extern void list_filter_out_nodes(struct list *list, bool (*cond)(void *data));
Expand Down
4 changes: 2 additions & 2 deletions lib/table.h
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ static inline struct route_node *route_table_iter_next(route_table_iter_t *iter)
/*
* route_table_iter_is_done
*
* Returns TRUE if the iteration is complete.
* Returns true if the iteration is complete.
*/
static inline int route_table_iter_is_done(route_table_iter_t *iter)
{
Expand All @@ -324,7 +324,7 @@ static inline int route_table_iter_is_done(route_table_iter_t *iter)
/*
* route_table_iter_started
*
* Returns TRUE if this iterator has started iterating over the tree.
* Returns true if this iterator has started iterating over the tree.
*/
static inline int route_table_iter_started(route_table_iter_t *iter)
{
Expand Down
4 changes: 2 additions & 2 deletions ospfd/ospf_spf.c
Original file line number Diff line number Diff line change
Expand Up @@ -804,7 +804,7 @@ static void ospf_spf_next(struct vertex *v, struct ospf *ospf,
int type = 0, lsa_pos = -1, lsa_pos_next = 0;

/* If this is a router-LSA, and bit V of the router-LSA (see Section
A.4.2:RFC2328) is set, set Area A's TransitCapability to TRUE. */
A.4.2:RFC2328) is set, set Area A's TransitCapability to true. */
if (v->type == OSPF_VERTEX_ROUTER) {
if (IS_ROUTER_LSA_VIRTUAL((struct router_lsa *)v->lsa))
area->transit = OSPF_TRANSIT_TRUE;
Expand Down Expand Up @@ -1207,7 +1207,7 @@ static void ospf_spf_calculate(struct ospf *ospf, struct ospf_area *area,
* spanning tree. */
v->lsa_p->stat = LSA_SPF_IN_SPFTREE;

/* Set Area A's TransitCapability to FALSE. */
/* Set Area A's TransitCapability to false. */
area->transit = OSPF_TRANSIT_FALSE;
area->shortcut_capability = 1;

Expand Down
Loading

0 comments on commit 2951a7a

Please sign in to comment.