diff options
Diffstat (limited to 'pimd/pim_static.c')
| -rw-r--r-- | pimd/pim_static.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/pimd/pim_static.c b/pimd/pim_static.c index 3d44a01c78..9569b7dcac 100644 --- a/pimd/pim_static.c +++ b/pimd/pim_static.c @@ -39,14 +39,7 @@ void pim_static_route_free(struct static_route *s_route) static struct static_route *static_route_alloc() { - struct static_route *s_route; - - s_route = XCALLOC(MTYPE_PIM_STATIC_ROUTE, sizeof(*s_route)); - if (!s_route) { - zlog_err("PIM XCALLOC(%zu) failure", sizeof(*s_route)); - return 0; - } - return s_route; + return XCALLOC(MTYPE_PIM_STATIC_ROUTE, sizeof(struct static_route)); } static struct static_route *static_route_new(unsigned int iif, unsigned int oif, @@ -55,9 +48,6 @@ static struct static_route *static_route_new(unsigned int iif, unsigned int oif, { struct static_route *s_route; s_route = static_route_alloc(); - if (!s_route) { - return 0; - } s_route->group = group; s_route->source = source; |
