mirror of
https://git.proxmox.com/git/mirror_iproute2
synced 2025-10-10 09:11:20 +00:00
lib/rt_names: Drop dead code in rtnl_rttable_n2a()
Since 'id' is 32bit unsigned, it can never exceed RT_TABLE_MAX (which is defined to 0xFFFFFFFF). Therefore drop that never matching conditional. Signed-off-by: Phil Sutter <phil@nwl.cc>
This commit is contained in:
parent
2a86625619
commit
b3c5f84493
@ -410,10 +410,6 @@ const char *rtnl_rttable_n2a(__u32 id, char *buf, int len)
|
|||||||
{
|
{
|
||||||
struct rtnl_hash_entry *entry;
|
struct rtnl_hash_entry *entry;
|
||||||
|
|
||||||
if (id > RT_TABLE_MAX) {
|
|
||||||
snprintf(buf, len, "%u", id);
|
|
||||||
return buf;
|
|
||||||
}
|
|
||||||
if (!rtnl_rttable_init)
|
if (!rtnl_rttable_init)
|
||||||
rtnl_rttable_initialize();
|
rtnl_rttable_initialize();
|
||||||
entry = rtnl_rttable_hash[id & 255];
|
entry = rtnl_rttable_hash[id & 255];
|
||||||
|
Loading…
Reference in New Issue
Block a user