]> git.ipfire.org Git - thirdparty/iproute2.git/commit
pie: remove always false condition
authorStephen Hemminger <stephen@networkplumber.org>
Fri, 10 Mar 2017 16:56:51 +0000 (08:56 -0800)
committerStephen Hemminger <stephen@networkplumber.org>
Fri, 10 Mar 2017 16:58:01 +0000 (08:58 -0800)
commit60ccfcd7f2c060b311cb5345c9841aae0c28fbe3
treeb76d70532c26f603ade61d71deadda262ea8786b
parent837552b445f5c1c537841a41c9ed398ff3b93083
pie: remove always false condition

When built with GCC warnings enabled:
q_pie.c: In function ‘pie_parse_opt’:
q_pie.c:78:38: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
        (alpha > ALPHA_MAX) || (alpha < ALPHA_MIN)) {
                                      ^
q_pie.c:85:35: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
        (beta > BETA_MAX) || (beta < BETA_MIN)) {
                                   ^

This is because MIN is 0 and unsigned number can never be less than 0.
Therefore just remove the _MIN values.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
tc/q_pie.c