mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-04 15:30:02 +00:00
*: return bool from boolean functions
Not 1 or 0. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
This commit is contained in:
parent
d8729f8cb5
commit
b08047f82d
@ -319,10 +319,10 @@ bool lcommunity_cmp(const void *arg1, const void *arg2)
|
||||
const struct lcommunity *lcom2 = arg2;
|
||||
|
||||
if (lcom1 == NULL && lcom2 == NULL)
|
||||
return 1;
|
||||
return true;
|
||||
|
||||
if (lcom1 == NULL || lcom2 == NULL)
|
||||
return 0;
|
||||
return false;
|
||||
|
||||
return (lcom1->size == lcom2->size
|
||||
&& memcmp(lcom1->val, lcom2->val, lcom_length(lcom1)) == 0);
|
||||
|
@ -440,7 +440,7 @@ static bool updgrp_hash_cmp(const void *p1, const void *p2)
|
||||
return false;
|
||||
|
||||
if (pe1->addpath_type[afi][safi] != pe2->addpath_type[afi][safi])
|
||||
return 0;
|
||||
return false;
|
||||
|
||||
if ((pe1->cap & PEER_UPDGRP_CAP_FLAGS)
|
||||
!= (pe2->cap & PEER_UPDGRP_CAP_FLAGS))
|
||||
|
@ -155,13 +155,13 @@ void frrstr_strvec_free(vector v)
|
||||
bool begins_with(const char *str, const char *prefix)
|
||||
{
|
||||
if (!str || !prefix)
|
||||
return 0;
|
||||
return false;
|
||||
|
||||
size_t lenstr = strlen(str);
|
||||
size_t lenprefix = strlen(prefix);
|
||||
|
||||
if (lenprefix > lenstr)
|
||||
return 0;
|
||||
return false;
|
||||
|
||||
return strncmp(str, prefix, lenprefix) == 0;
|
||||
}
|
||||
|
@ -105,7 +105,7 @@ static unsigned int log_key(void *data)
|
||||
static bool log_cmp(const void *a, const void *b)
|
||||
{
|
||||
if (a == NULL || b == NULL)
|
||||
return 0;
|
||||
return false;
|
||||
|
||||
return !memcmp(a, b, 2 * sizeof(struct prefix));
|
||||
}
|
||||
|
@ -388,7 +388,7 @@ bool zebra_pbr_iptable_hash_equal(const void *arg1, const void *arg2)
|
||||
r2 = (const struct zebra_pbr_iptable *)arg2;
|
||||
|
||||
if (r1->vrf_id != r2->vrf_id)
|
||||
return 0;
|
||||
return false;
|
||||
if (r1->type != r2->type)
|
||||
return false;
|
||||
if (r1->unique != r2->unique)
|
||||
|
Loading…
Reference in New Issue
Block a user