From: Donald Sharp Date: Tue, 5 Dec 2017 00:29:42 +0000 (-0500) Subject: babeld: if_eui64 never uses ifname X-Git-Tag: frr-4.0-dev~108^2~5 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=edb1d4a09acdf27c04ce27adf1b06e4faa86454a;p=matthieu%2Ffrr.git babeld: if_eui64 never uses ifname Remove this variable. Signed-off-by: Donald Sharp --- diff --git a/babeld/babeld.c b/babeld/babeld.c index 00367612c6..20dd098f33 100644 --- a/babeld/babeld.c +++ b/babeld/babeld.c @@ -229,7 +229,7 @@ babel_get_myid(void) int ifindex = if_nametoindex(ifp->name); if(ifindex > 0) { unsigned char eui[8]; - rc = if_eui64(ifp->name, ifindex, eui); + rc = if_eui64(ifindex, eui); if(rc < 0) continue; memcpy(myid, eui, 8); @@ -245,7 +245,7 @@ babel_get_myid(void) ifname = if_indextoname(i, buf); if(ifname == NULL) continue; - rc = if_eui64(ifname, i, eui); + rc = if_eui64(i, eui); if(rc < 0) continue; memcpy(myid, eui, 8); diff --git a/babeld/kernel.c b/babeld/kernel.c index 3343ca2e95..8c4fc953e7 100644 --- a/babeld/kernel.c +++ b/babeld/kernel.c @@ -203,7 +203,7 @@ zebra_route(int add, int family, const unsigned char *pref, unsigned short plen, } int -if_eui64(char *ifname, int ifindex, unsigned char *eui) +if_eui64(int ifindex, unsigned char *eui) { struct interface *ifp = if_lookup_by_index(ifindex, VRF_DEFAULT); if (ifp == NULL) { diff --git a/babeld/kernel.h b/babeld/kernel.h index 7ade26dc36..eb1e793279 100644 --- a/babeld/kernel.h +++ b/babeld/kernel.h @@ -40,7 +40,7 @@ int kernel_route(int operation, const unsigned char *dest, unsigned short plen, const unsigned char *gate, int ifindex, unsigned int metric, const unsigned char *newgate, int newifindex, unsigned int newmetric); -int if_eui64(char *ifname, int ifindex, unsigned char *eui); +int if_eui64(int ifindex, unsigned char *eui); int gettime(struct timeval *tv); int read_random_bytes(void *buf, size_t len);