Merge pull request #5650 from qlyoung/fix-cast-malloc

zebra: remove cast from l3vni XMALLOC
This commit is contained in:
Mark Stapp 2020-01-07 16:46:29 -05:00 committed by GitHub
commit 025f44802b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -162,8 +162,7 @@ static inline const char *zl3vni_rmac2str(zebra_l3vni_t *zl3vni, char *buf,
char *ptr;
if (!buf)
ptr = (char *)XMALLOC(MTYPE_TMP,
ETHER_ADDR_STRLEN * sizeof(char));
ptr = XMALLOC(MTYPE_TMP, ETHER_ADDR_STRLEN * sizeof(char));
else {
assert(size >= ETHER_ADDR_STRLEN);
ptr = buf;
@ -200,8 +199,7 @@ static inline const char *zl3vni_sysmac2str(zebra_l3vni_t *zl3vni, char *buf,
char *ptr;
if (!buf)
ptr = (char *)XMALLOC(MTYPE_TMP,
ETHER_ADDR_STRLEN * sizeof(char));
ptr = XMALLOC(MTYPE_TMP, ETHER_ADDR_STRLEN * sizeof(char));
else {
assert(size >= ETHER_ADDR_STRLEN);
ptr = buf;