mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-06 07:37:54 +00:00
lib: constify a few parameters in the VRF code
Parameters should be const whenever possible to improve code readability and remove the need to cast away the constness of const arguments. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
This commit is contained in:
parent
5c84b9a581
commit
02fe07c7b8
@ -572,7 +572,7 @@ static int vrf_default_accepts_vrf(int type)
|
|||||||
|
|
||||||
/* Create a socket for the VRF. */
|
/* Create a socket for the VRF. */
|
||||||
int vrf_socket(int domain, int type, int protocol, vrf_id_t vrf_id,
|
int vrf_socket(int domain, int type, int protocol, vrf_id_t vrf_id,
|
||||||
char *interfacename)
|
const char *interfacename)
|
||||||
{
|
{
|
||||||
int ret, save_errno, ret2;
|
int ret, save_errno, ret2;
|
||||||
|
|
||||||
@ -947,7 +947,7 @@ vrf_id_t vrf_get_default_id(void)
|
|||||||
return VRF_DEFAULT_INTERNAL;
|
return VRF_DEFAULT_INTERNAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
int vrf_bind(vrf_id_t vrf_id, int fd, char *name)
|
int vrf_bind(vrf_id_t vrf_id, int fd, const char *name)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
@ -1006,7 +1006,7 @@ int vrf_ioctl(vrf_id_t vrf_id, int d, unsigned long request, char *params)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int vrf_sockunion_socket(const union sockunion *su, vrf_id_t vrf_id,
|
int vrf_sockunion_socket(const union sockunion *su, vrf_id_t vrf_id,
|
||||||
char *interfacename)
|
const char *interfacename)
|
||||||
{
|
{
|
||||||
int ret, save_errno, ret2;
|
int ret, save_errno, ret2;
|
||||||
|
|
||||||
|
@ -215,12 +215,12 @@ extern void vrf_terminate(void);
|
|||||||
|
|
||||||
/* Create a socket serving for the given VRF */
|
/* Create a socket serving for the given VRF */
|
||||||
extern int vrf_socket(int domain, int type, int protocol, vrf_id_t vrf_id,
|
extern int vrf_socket(int domain, int type, int protocol, vrf_id_t vrf_id,
|
||||||
char *name);
|
const char *name);
|
||||||
|
|
||||||
extern int vrf_sockunion_socket(const union sockunion *su, vrf_id_t vrf_id,
|
extern int vrf_sockunion_socket(const union sockunion *su, vrf_id_t vrf_id,
|
||||||
char *name);
|
const char *name);
|
||||||
|
|
||||||
extern int vrf_bind(vrf_id_t vrf_id, int fd, char *name);
|
extern int vrf_bind(vrf_id_t vrf_id, int fd, const char *name);
|
||||||
|
|
||||||
/* VRF ioctl operations */
|
/* VRF ioctl operations */
|
||||||
extern int vrf_getaddrinfo(const char *node, const char *service,
|
extern int vrf_getaddrinfo(const char *node, const char *service,
|
||||||
|
Loading…
Reference in New Issue
Block a user