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
12
bfdd/bfd.c
12
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,
|
||||
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. */
|
||||
static unsigned int bfd_id_hash_do(const void *p)
|
||||
@ -1343,7 +1341,8 @@ struct bfd_key_walk_partial_lookup {
|
||||
};
|
||||
|
||||
/* 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 *)data;
|
||||
@ -1354,7 +1353,8 @@ static int bfd_key_lookup_ignore_partial_walker(struct hash_bucket *b, void *dat
|
||||
return HASHWALK_CONTINUE;
|
||||
if (given->key.mhop != parsed->key.mhop)
|
||||
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;
|
||||
if (memcmp(given->key.vrfname, parsed->key.vrfname, MAXNAMELEN))
|
||||
return HASHWALK_CONTINUE;
|
||||
@ -1538,7 +1538,7 @@ struct bfd_session_iterator {
|
||||
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 *bs = hb->data;
|
||||
@ -1588,7 +1588,7 @@ const struct bfd_session *bfd_session_next(const struct bfd_session *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__)))
|
||||
{
|
||||
struct bfd_session *bs = hb->data;
|
||||
|
@ -27,20 +27,10 @@
|
||||
|
||||
#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.
|
||||
*/
|
||||
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)
|
||||
{
|
||||
const char *ifname = NULL, *vrfname = NULL;
|
||||
@ -64,7 +54,7 @@ void bfd_session_get_key(bool mhop, const struct lyd_node *dnode,
|
||||
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)
|
||||
{
|
||||
struct bfd_session *bs;
|
||||
@ -126,8 +116,8 @@ int bfd_session_create(enum nb_event event, const struct lyd_node *dnode,
|
||||
return NB_OK;
|
||||
}
|
||||
|
||||
int bfd_session_destroy(enum nb_event event, const struct lyd_node *dnode,
|
||||
bool mhop)
|
||||
static int bfd_session_destroy(enum nb_event event,
|
||||
const struct lyd_node *dnode, bool mhop)
|
||||
{
|
||||
struct bfd_session *bs;
|
||||
struct bfd_key bk;
|
||||
|
Loading…
Reference in New Issue
Block a user