From: Thomas Jarosch Date: Wed, 23 Nov 2011 21:15:19 +0000 (+0100) Subject: tc: Use correct variable type for get_distribution() result X-Git-Tag: v3.2.0~24 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fcbd0165fcf6d0efdfb02220ac77342ce0c0e224;p=thirdparty%2Fiproute2.git tc: Use correct variable type for get_distribution() result get_distribution() returns an int. cppcheck reported: [tc/q_netem.c:243]: (style) Checking if unsigned variable 'dist_size' is less than zero. The mismatch actually rendered the error checking after get_distribution() ineffective. Signed-off-by: Thomas Jarosch --- diff --git a/tc/q_netem.c b/tc/q_netem.c index 01639a870..6dc40bd95 100644 --- a/tc/q_netem.c +++ b/tc/q_netem.c @@ -125,7 +125,7 @@ static int get_ticks(__u32 *ticks, const char *str) static int netem_parse_opt(struct qdisc_util *qu, int argc, char **argv, struct nlmsghdr *n) { - size_t dist_size = 0; + int dist_size = 0; struct rtattr *tail; struct tc_netem_qopt opt; struct tc_netem_corr cor;