summaryrefslogtreecommitdiff
path: root/lib/vrf.c
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2019-01-04 19:08:10 -0200
committerRenato Westphal <renato@opensourcerouting.org>2019-01-18 16:15:41 -0200
commit02fe07c7b8f2191d1f53b31888e95d6c12c48ad9 (patch)
tree0a619feab4f284d9897f9684723bf78d3baf2171 /lib/vrf.c
parent5c84b9a58153f89379e3a99e02173662ea390489 (diff)
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>
Diffstat (limited to 'lib/vrf.c')
-rw-r--r--lib/vrf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/vrf.c b/lib/vrf.c
index 0c82f6a3cd..e1f27b7e72 100644
--- a/lib/vrf.c
+++ b/lib/vrf.c
@@ -572,7 +572,7 @@ static int vrf_default_accepts_vrf(int type)
/* Create a socket for the VRF. */
int vrf_socket(int domain, int type, int protocol, vrf_id_t vrf_id,
- char *interfacename)
+ const char *interfacename)
{
int ret, save_errno, ret2;
@@ -947,7 +947,7 @@ vrf_id_t vrf_get_default_id(void)
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;
@@ -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,
- char *interfacename)
+ const char *interfacename)
{
int ret, save_errno, ret2;