summaryrefslogtreecommitdiffstats
path: root/zebra
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 /zebra
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 'zebra')
-rw-r--r--zebra/zebra_dplane.c4
-rw-r--r--zebra/zebra_ptm.c2
2 files changed, 0 insertions, 6 deletions
diff --git a/zebra/zebra_dplane.c b/zebra/zebra_dplane.c
index 28f7666f8..894914e57 100644
--- a/zebra/zebra_dplane.c
+++ b/zebra/zebra_dplane.c
@@ -1474,10 +1474,6 @@ int dplane_provider_register(const char *name,
/* Allocate and init new provider struct */
p = XCALLOC(MTYPE_DP_PROV, sizeof(struct zebra_dplane_provider));
- if (p == NULL) {
- ret = ENOMEM;
- goto done;
- }
pthread_mutex_init(&(p->dp_mutex), NULL);
TAILQ_INIT(&(p->dp_ctx_in_q));
diff --git a/zebra/zebra_ptm.c b/zebra/zebra_ptm.c
index 1e942d643..cc5e38e69 100644
--- a/zebra/zebra_ptm.c
+++ b/zebra/zebra_ptm.c
@@ -1215,8 +1215,6 @@ static struct ptm_process *pp_new(pid_t pid, struct zserv *zs)
/* Allocate and register new process. */
pp = XCALLOC(MTYPE_ZEBRA_PTM_BFD_PROCESS, sizeof(*pp));
- if (pp == NULL)
- return NULL;
pp->pp_pid = pid;
pp->pp_zs = zs;