From b2bc8e2331ad67f282d423c17204a27f6b69525a 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 dbc2a430bc..997f1d3c34 100644 --- a/bgpd/rfapi/rfapi_vty.c +++ b/bgpd/rfapi/rfapi_vty.c @@ -314,19 +314,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