mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-17 21:38:11 +00:00
bfdd: fix some CI warnings
Use `static` functions for file local functions to please `check_patch.pl`. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
This commit is contained in:
parent
fdf8ac87f8
commit
307fc4259a
16
bfdd/bfd.c
16
bfdd/bfd.c
@ -1289,8 +1289,6 @@ static unsigned int bfd_key_hash_do(const void *p);
|
|||||||
|
|
||||||
static void _bfd_free(struct hash_bucket *hb,
|
static void _bfd_free(struct hash_bucket *hb,
|
||||||
void *arg __attribute__((__unused__)));
|
void *arg __attribute__((__unused__)));
|
||||||
int _bfd_session_next(struct hash_bucket *hb, void *arg);
|
|
||||||
void _bfd_session_remove_manual(struct hash_bucket *hb, void *arg);
|
|
||||||
|
|
||||||
/* BFD hash for our discriminator. */
|
/* BFD hash for our discriminator. */
|
||||||
static unsigned int bfd_id_hash_do(const void *p)
|
static unsigned int bfd_id_hash_do(const void *p)
|
||||||
@ -1343,9 +1341,10 @@ struct bfd_key_walk_partial_lookup {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* ignore some parameters */
|
/* ignore some parameters */
|
||||||
static int bfd_key_lookup_ignore_partial_walker(struct hash_bucket *b, void *data)
|
static int bfd_key_lookup_ignore_partial_walker(struct hash_bucket *b,
|
||||||
|
void *data)
|
||||||
{
|
{
|
||||||
struct bfd_key_walk_partial_lookup *ctx =
|
struct bfd_key_walk_partial_lookup *ctx =
|
||||||
(struct bfd_key_walk_partial_lookup *)data;
|
(struct bfd_key_walk_partial_lookup *)data;
|
||||||
struct bfd_session *given = ctx->given;
|
struct bfd_session *given = ctx->given;
|
||||||
struct bfd_session *parsed = b->data;
|
struct bfd_session *parsed = b->data;
|
||||||
@ -1354,7 +1353,8 @@ static int bfd_key_lookup_ignore_partial_walker(struct hash_bucket *b, void *dat
|
|||||||
return HASHWALK_CONTINUE;
|
return HASHWALK_CONTINUE;
|
||||||
if (given->key.mhop != parsed->key.mhop)
|
if (given->key.mhop != parsed->key.mhop)
|
||||||
return HASHWALK_CONTINUE;
|
return HASHWALK_CONTINUE;
|
||||||
if (memcmp(&given->key.peer, &parsed->key.peer, sizeof(struct in6_addr)))
|
if (memcmp(&given->key.peer, &parsed->key.peer,
|
||||||
|
sizeof(struct in6_addr)))
|
||||||
return HASHWALK_CONTINUE;
|
return HASHWALK_CONTINUE;
|
||||||
if (memcmp(given->key.vrfname, parsed->key.vrfname, MAXNAMELEN))
|
if (memcmp(given->key.vrfname, parsed->key.vrfname, MAXNAMELEN))
|
||||||
return HASHWALK_CONTINUE;
|
return HASHWALK_CONTINUE;
|
||||||
@ -1538,7 +1538,7 @@ struct bfd_session_iterator {
|
|||||||
const struct bfd_session *bsi_bs;
|
const struct bfd_session *bsi_bs;
|
||||||
};
|
};
|
||||||
|
|
||||||
int _bfd_session_next(struct hash_bucket *hb, void *arg)
|
static int _bfd_session_next(struct hash_bucket *hb, void *arg)
|
||||||
{
|
{
|
||||||
struct bfd_session_iterator *bsi = arg;
|
struct bfd_session_iterator *bsi = arg;
|
||||||
struct bfd_session *bs = hb->data;
|
struct bfd_session *bs = hb->data;
|
||||||
@ -1588,8 +1588,8 @@ const struct bfd_session *bfd_session_next(const struct bfd_session *bs,
|
|||||||
return bsi.bsi_bs;
|
return bsi.bsi_bs;
|
||||||
}
|
}
|
||||||
|
|
||||||
void _bfd_session_remove_manual(struct hash_bucket *hb,
|
static void _bfd_session_remove_manual(struct hash_bucket *hb,
|
||||||
void *arg __attribute__((__unused__)))
|
void *arg __attribute__((__unused__)))
|
||||||
{
|
{
|
||||||
struct bfd_session *bs = hb->data;
|
struct bfd_session *bs = hb->data;
|
||||||
|
|
||||||
|
@ -27,21 +27,11 @@
|
|||||||
|
|
||||||
#include "bfd.h"
|
#include "bfd.h"
|
||||||
|
|
||||||
/*
|
|
||||||
* Prototypes.
|
|
||||||
*/
|
|
||||||
void bfd_session_get_key(bool mhop, const struct lyd_node *dnode,
|
|
||||||
struct bfd_key *bk);
|
|
||||||
int bfd_session_create(enum nb_event event, const struct lyd_node *dnode,
|
|
||||||
union nb_resource *resource, bool mhop);
|
|
||||||
int bfd_session_destroy(enum nb_event event, const struct lyd_node *dnode,
|
|
||||||
bool mhop);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Helpers.
|
* Helpers.
|
||||||
*/
|
*/
|
||||||
void bfd_session_get_key(bool mhop, const struct lyd_node *dnode,
|
static void bfd_session_get_key(bool mhop, const struct lyd_node *dnode,
|
||||||
struct bfd_key *bk)
|
struct bfd_key *bk)
|
||||||
{
|
{
|
||||||
const char *ifname = NULL, *vrfname = NULL;
|
const char *ifname = NULL, *vrfname = NULL;
|
||||||
struct sockaddr_any psa, lsa;
|
struct sockaddr_any psa, lsa;
|
||||||
@ -64,8 +54,8 @@ void bfd_session_get_key(bool mhop, const struct lyd_node *dnode,
|
|||||||
gen_bfd_key(bk, &psa, &lsa, mhop, ifname, vrfname);
|
gen_bfd_key(bk, &psa, &lsa, mhop, ifname, vrfname);
|
||||||
}
|
}
|
||||||
|
|
||||||
int bfd_session_create(enum nb_event event, const struct lyd_node *dnode,
|
static int bfd_session_create(enum nb_event event, const struct lyd_node *dnode,
|
||||||
union nb_resource *resource, bool mhop)
|
union nb_resource *resource, bool mhop)
|
||||||
{
|
{
|
||||||
struct bfd_session *bs;
|
struct bfd_session *bs;
|
||||||
struct bfd_key bk;
|
struct bfd_key bk;
|
||||||
@ -126,8 +116,8 @@ int bfd_session_create(enum nb_event event, const struct lyd_node *dnode,
|
|||||||
return NB_OK;
|
return NB_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
int bfd_session_destroy(enum nb_event event, const struct lyd_node *dnode,
|
static int bfd_session_destroy(enum nb_event event,
|
||||||
bool mhop)
|
const struct lyd_node *dnode, bool mhop)
|
||||||
{
|
{
|
||||||
struct bfd_session *bs;
|
struct bfd_session *bs;
|
||||||
struct bfd_key bk;
|
struct bfd_key bk;
|
||||||
|
Loading…
Reference in New Issue
Block a user