From: Phil Sutter Date: Thu, 17 Aug 2017 17:09:28 +0000 (+0200) Subject: lib/rt_names: Drop dead code in rtnl_rttable_n2a() X-Git-Tag: v4.13.0~50 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b3c5f84493d3399a546566475203207aa5b64d54;p=thirdparty%2Fiproute2.git 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 --- diff --git a/lib/rt_names.c b/lib/rt_names.c index 04c15ff5b..e5efd78e6 100644 --- a/lib/rt_names.c +++ b/lib/rt_names.c @@ -410,10 +410,6 @@ const char *rtnl_rttable_n2a(__u32 id, char *buf, int len) { struct rtnl_hash_entry *entry; - if (id > RT_TABLE_MAX) { - snprintf(buf, len, "%u", id); - return buf; - } if (!rtnl_rttable_init) rtnl_rttable_initialize(); entry = rtnl_rttable_hash[id & 255];