diff options
Diffstat (limited to 'lib/route/link/vrf.c')
-rw-r--r-- | lib/route/link/vrf.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/lib/route/link/vrf.c b/lib/route/link/vrf.c index 8b6b451f..c4edd3ef 100644 --- a/lib/route/link/vrf.c +++ b/lib/route/link/vrf.c @@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/route/link/vrf.c VRF Link Info - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation version 2.1 - * of the License. - * * Copyright (c) 2015 Cumulus Networks. All rights reserved. * Copyright (c) 2015 David Ahern <dsa@cumulusnetworks.com> */ @@ -181,12 +175,11 @@ static struct rtnl_link_info_ops vrf_info_ops = { struct rtnl_link *rtnl_link_vrf_alloc(void) { struct rtnl_link *link; - int err; if (!(link = rtnl_link_alloc())) return NULL; - if ((err = rtnl_link_set_type(link, "vrf")) < 0) { + if (rtnl_link_set_type(link, "vrf") < 0) { rtnl_link_put(link); return NULL; } @@ -240,8 +233,8 @@ int rtnl_link_vrf_set_tableid(struct rtnl_link *link, uint32_t id) struct vrf_info *vi = link->l_info; IS_VRF_LINK_ASSERT(link); - if(id > VRF_TABLE_ID_MAX) - return -NLE_INVAL; + + _NL_STATIC_ASSERT(VRF_TABLE_ID_MAX == UINT32_MAX); vi->table_id = id; vi->vi_mask |= VRF_HAS_TABLE_ID; |