summaryrefslogtreecommitdiffstats
path: root/lib/route/tc.c
diff options
context:
space:
mode:
authorThomas Graf <tgraf@suug.ch>2014-08-26 12:08:41 (GMT)
committerThomas Haller <thaller@redhat.com>2014-08-26 12:12:52 (GMT)
commit7c775184c107b8abd1acd3122c357e0d020376df (patch)
treefbfc504d0367a25ce06281ea651dc768edf2481c /lib/route/tc.c
parent54f6d7d1b376348a710c482e3f6852ffaa8675c3 (diff)
downloadlibnl-7c775184c107b8abd1acd3122c357e0d020376df.zip
libnl-7c775184c107b8abd1acd3122c357e0d020376df.tar.gz
libnl-7c775184c107b8abd1acd3122c357e0d020376df.tar.bz2
Remove pointless N < 0 checks
route/tc.c:553:9: warning: comparison of unsigned enum expression < 0 is always false [-Wtautological-compare] if (id < 0 || id > RTNL_TC_STATS_MAX) Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: Thomas Haller <thaller@redhat.com>
Diffstat (limited to 'lib/route/tc.c')
-rw-r--r--lib/route/tc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/route/tc.c b/lib/route/tc.c
index 34c3b57..53b69d5 100644
--- a/lib/route/tc.c
+++ b/lib/route/tc.c
@@ -550,7 +550,7 @@ char *rtnl_tc_get_kind(struct rtnl_tc *tc)
*/
uint64_t rtnl_tc_get_stat(struct rtnl_tc *tc, enum rtnl_tc_stat id)
{
- if (id < 0 || id > RTNL_TC_STATS_MAX)
+ if ((unsigned int) id > RTNL_TC_STATS_MAX)
return 0;
return tc->tc_stats[id];