diff options
| -rw-r--r-- | bfdd/bfd_packet.c | 2 | ||||
| -rw-r--r-- | bfdd/bfdd_vty.c | 4 | ||||
| -rw-r--r-- | bgpd/bgp_lcommunity.c | 4 | ||||
| -rw-r--r-- | bgpd/bgp_pbr.c | 6 | ||||
| -rw-r--r-- | bgpd/bgpd.c | 2 | ||||
| -rw-r--r-- | isisd/isis_pdu.c | 4 | ||||
| -rw-r--r-- | lib/command_graph.c | 2 | ||||
| -rw-r--r-- | lib/libfrr.c | 2 | ||||
| -rw-r--r-- | lib/northbound_confd.c | 2 | ||||
| -rw-r--r-- | lib/yang_wrappers.c | 2 | ||||
| -rw-r--r-- | pbrd/pbr_nht.c | 2 | 
11 files changed, 16 insertions, 16 deletions
diff --git a/bfdd/bfd_packet.c b/bfdd/bfd_packet.c index 45c5f5dbdc..8601bd2e40 100644 --- a/bfdd/bfd_packet.c +++ b/bfdd/bfd_packet.c @@ -544,7 +544,7 @@ int bfd_recv_cb(struct thread *t)  	}  	/* Validate packet TTL. */ -	if ((is_mhop == false) && (ttl != BFD_TTL_VAL)) { +	if ((!is_mhop) && (ttl != BFD_TTL_VAL)) {  		cp_debug(is_mhop, &peer, &local, ifindex, vrfid,  			 "invalid TTL: %d expected %d", ttl, BFD_TTL_VAL);  		return 0; diff --git a/bfdd/bfdd_vty.c b/bfdd/bfdd_vty.c index 0041f9cc2e..c77cd08be8 100644 --- a/bfdd/bfdd_vty.c +++ b/bfdd/bfdd_vty.c @@ -564,7 +564,7 @@ static void _display_all_peers(struct vty *vty, bool use_json)  {  	struct json_object *jo; -	if (use_json == false) { +	if (!use_json) {  		vty_out(vty, "BFD Peers:\n");  		bfd_id_iterate(_display_peer_iter, vty);  		return; @@ -647,7 +647,7 @@ static void _display_peers_counter(struct vty *vty, bool use_json)  {  	struct json_object *jo; -	if (use_json == false) { +	if (!use_json) {  		vty_out(vty, "BFD Peers:\n");  		bfd_id_iterate(_display_peer_counter_iter, vty);  		return; diff --git a/bgpd/bgp_lcommunity.c b/bgpd/bgp_lcommunity.c index cfc9af7777..06281e16c6 100644 --- a/bgpd/bgp_lcommunity.c +++ b/bgpd/bgp_lcommunity.c @@ -180,7 +180,7 @@ static void set_lcommunity_string(struct lcommunity *lcom, bool make_json)  {  	int i;  	int len; -	bool first = 1; +	bool first = true;  	char *str_buf;  	char *str_pnt;  	uint8_t *pnt; @@ -218,7 +218,7 @@ static void set_lcommunity_string(struct lcommunity *lcom, bool make_json)  	for (i = 0; i < lcom->size; i++) {  		if (first) -			first = 0; +			first = false;  		else  			*str_pnt++ = ' '; diff --git a/bgpd/bgp_pbr.c b/bgpd/bgp_pbr.c index 4c51db8e14..c0be36ed3f 100644 --- a/bgpd/bgp_pbr.c +++ b/bgpd/bgp_pbr.c @@ -333,7 +333,7 @@ static bool bgp_pbr_extract_enumerate_unary(struct bgp_pbr_match_val list[],  						 unary_operator, and_valmask,  						 or_valmask, list[i].value,  						 type_entry); -				if (ret == false) +				if (!ret)  					return ret;  				continue;  			} @@ -441,7 +441,7 @@ static bool bgp_pbr_extract(struct bgp_pbr_match_val list[],  				range->min_port = list[i].value;  			exact_match = true;  		} -		if (exact_match == true && i > 0) +		if (exact_match && i > 0)  			return false;  		if (list[i].compare_operator ==  		    (OPERATOR_COMPARE_GREATER_THAN + @@ -545,7 +545,7 @@ static int bgp_pbr_validate_policy_route(struct bgp_pbr_entry_main *api)  					   "too complex. ignoring.");  			return 0;  		} else if (api->match_icmp_type_num > 1 && -			   enumerate_icmp == false) { +			   !enumerate_icmp) {  			if (BGP_DEBUG(pbr, PBR))  				zlog_debug("BGP: match icmp code is enumerate"  					   ", and icmp type is not." diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c index 6091ddcdfa..d69b7fcc09 100644 --- a/bgpd/bgpd.c +++ b/bgpd/bgpd.c @@ -116,7 +116,7 @@ static int bgp_check_main_socket(bool create, struct bgp *bgp)  {  	static int bgp_server_main_created; -	if (create == true) { +	if (create) {  		if (bgp_server_main_created)  			return 0;  		if (bgp_socket(bgp, bm->port, bm->address) < 0) diff --git a/isisd/isis_pdu.c b/isisd/isis_pdu.c index 330da9b216..af35ed2e3c 100644 --- a/isisd/isis_pdu.c +++ b/isisd/isis_pdu.c @@ -2146,11 +2146,11 @@ int send_csnp(struct isis_circuit *circuit, int level)  		 * stop lsp_id in this current CSNP.  		 */  		memcpy(start, stop, ISIS_SYS_ID_LEN + 2); -		loop = 0; +		loop = false;  		for (int i = ISIS_SYS_ID_LEN + 1; i >= 0; --i) {  			if (start[i] < (uint8_t)0xff) {  				start[i] += 1; -				loop = 1; +				loop = true;  				break;  			}  		} diff --git a/lib/command_graph.c b/lib/command_graph.c index 0e8669c4b5..4757fd951f 100644 --- a/lib/command_graph.c +++ b/lib/command_graph.c @@ -471,7 +471,7 @@ void cmd_graph_node_print_cb(struct graph_node *gn, struct buffer *buf)  	struct cmd_token *tok = gn->data;  	const char *color; -	if (wasend == true) { +	if (wasend) {  		wasend = false;  		return;  	} diff --git a/lib/libfrr.c b/lib/libfrr.c index 9119b04992..1afe30d618 100644 --- a/lib/libfrr.c +++ b/lib/libfrr.c @@ -61,7 +61,7 @@ static char dbfile_default[512];  #endif  static char vtypath_default[256]; -bool debug_memstats_at_exit = 0; +bool debug_memstats_at_exit = false;  static bool nodetach_term, nodetach_daemon;  static char comb_optstr[256]; diff --git a/lib/northbound_confd.c b/lib/northbound_confd.c index a8e0017819..a499d48c12 100644 --- a/lib/northbound_confd.c +++ b/lib/northbound_confd.c @@ -1383,7 +1383,7 @@ error:  static int frr_confd_finish(void)  { -	if (confd_connected == false) +	if (!confd_connected)  		return 0;  	frr_confd_finish_cdb(); diff --git a/lib/yang_wrappers.c b/lib/yang_wrappers.c index 6273dff3ce..7ecea5f445 100644 --- a/lib/yang_wrappers.c +++ b/lib/yang_wrappers.c @@ -62,7 +62,7 @@ bool yang_str2bool(const char *value)  struct yang_data *yang_data_new_bool(const char *xpath, bool value)  { -	return yang_data_new(xpath, (value == true) ? "true" : "false"); +	return yang_data_new(xpath, (value) ? "true" : "false");  }  bool yang_dnode_get_bool(const struct lyd_node *dnode, const char *xpath_fmt, diff --git a/pbrd/pbr_nht.c b/pbrd/pbr_nht.c index 2cba657f65..6a025fd724 100644 --- a/pbrd/pbr_nht.c +++ b/pbrd/pbr_nht.c @@ -740,7 +740,7 @@ uint32_t pbr_nht_get_next_tableid(bool peek)  	bool found = false;  	for (i = pbr_nhg_low_table; i <= pbr_nhg_high_table; i++) { -		if (nhg_tableid[i] == false) { +		if (!nhg_tableid[i]) {  			found = true;  			break;  		}  | 
