summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_routemap.c
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2019-02-25 20:43:09 +0100
committerQuentin Young <qlyoung@cumulusnetworks.com>2019-02-26 00:00:44 +0100
commit76f014689093aa8eecc1061e13cc4f8694967a12 (patch)
treed68df7e97b46f672cd944e89e62d823149781d07 /bgpd/bgp_routemap.c
parent*: use array_size instead of raw division (diff)
downloadfrr-76f014689093aa8eecc1061e13cc4f8694967a12.tar.xz
frr-76f014689093aa8eecc1061e13cc4f8694967a12.zip
*: do not check XMALLOC / XCALLOC for null ret
They never return NULL Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'bgpd/bgp_routemap.c')
-rw-r--r--bgpd/bgp_routemap.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/bgpd/bgp_routemap.c b/bgpd/bgp_routemap.c
index 17109281b..7be0e508d 100644
--- a/bgpd/bgp_routemap.c
+++ b/bgpd/bgp_routemap.c
@@ -197,8 +197,6 @@ static void *route_value_compile(const char *arg)
}
rv = XMALLOC(MTYPE_ROUTE_MAP_COMPILED, sizeof(struct rmap_value));
- if (!rv)
- return NULL;
rv->action = action;
rv->variable = var;
@@ -837,8 +835,6 @@ static void *route_match_vni_compile(const char *arg)
char *end = NULL;
vni = XMALLOC(MTYPE_ROUTE_MAP_COMPILED, sizeof(vni_t));
- if (!vni)
- return NULL;
*vni = strtoul(arg, &end, 10);
if (*end != '\0') {
@@ -998,9 +994,6 @@ static void *route_match_local_pref_compile(const char *arg)
local_pref = XMALLOC(MTYPE_ROUTE_MAP_COMPILED, sizeof(uint32_t));
- if (!local_pref)
- return local_pref;
-
*local_pref = tmpval;
return local_pref;
}