summaryrefslogtreecommitdiffstats
path: root/lib/prefix.c
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2019-02-25 21:30:31 +0100
committerQuentin Young <qlyoung@cumulusnetworks.com>2019-02-26 00:00:46 +0100
commit9f5dc3192ed5325b39bdb0580700652b06440606 (patch)
treeb880320cec863ad781dab6650592a942b19d92a1 /lib/prefix.c
parent*: remove null check before XFREE (diff)
downloadfrr-9f5dc3192ed5325b39bdb0580700652b06440606.tar.xz
frr-9f5dc3192ed5325b39bdb0580700652b06440606.zip
*: remove casts of XMALLOC / XCALLOC
No cast necessary for void * Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'lib/prefix.c')
-rw-r--r--lib/prefix.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/prefix.c b/lib/prefix.c
index 72ae0e635..365a9ba38 100644
--- a/lib/prefix.c
+++ b/lib/prefix.c
@@ -1502,8 +1502,7 @@ char *prefix_mac2str(const struct ethaddr *mac, char *buf, int size)
if (!mac)
return NULL;
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;
@@ -1584,8 +1583,7 @@ char *esi_to_str(const esi_t *esi, char *buf, int size)
if (!esi)
return NULL;
if (!buf)
- ptr = (char *)XMALLOC(MTYPE_TMP,
- ESI_STR_LEN * sizeof(char));
+ ptr = XMALLOC(MTYPE_TMP, ESI_STR_LEN * sizeof(char));
else {
assert(size >= ESI_STR_LEN);
ptr = buf;