From 141e18446c85954056b72428f4f3f531105e51e9 Mon Sep 17 00:00:00 2001 From: Philippe Guibert Date: Wed, 1 Feb 2017 18:41:38 +0100 Subject: [PATCH] bgpd: use mac2str() function utility to display mac address VNC uses the prefix API to handle mac string. Signed-off-by: Philippe Guibert --- bgpd/rfapi/rfapi_vty.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/bgpd/rfapi/rfapi_vty.c b/bgpd/rfapi/rfapi_vty.c index f7c3773fd4..f08ab98be3 100644 --- a/bgpd/rfapi/rfapi_vty.c +++ b/bgpd/rfapi/rfapi_vty.c @@ -313,19 +313,7 @@ rfapiL2o2Qprefix (struct rfapi_l2address_option *l2o, struct prefix *pfx) char * rfapiEthAddr2Str (const struct ethaddr *ea, char *buf, int bufsize) { - int i; - char *p = buf; - - assert (bufsize > (3 * ETHER_ADDR_LEN)); - - for (i = 0; i <= ETHER_ADDR_LEN; ++i) - { - sprintf (p, "%02x", ea->octet[i]); - if (i < (ETHER_ADDR_LEN - 1)) - *(p + 2) = ':'; - p += 3; - } - return buf; + return mac2str (ea->octet, buf, bufsize); } int -- 2.39.5