[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20130815.135102.1979894992456635853.davem@davemloft.net>
Date: Thu, 15 Aug 2013 13:51:02 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: ffusco@...hat.com
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH net-next 1/2] ipv4: IP_TOS and IP_TTL can be specified
as ancillary data
From: Francesco Fusco <ffusco@...hat.com>
Date: Wed, 14 Aug 2013 17:48:38 +0200
> + __s16 ttl;
> + __s16 tos;
You're range validating these values to make sure they are always
between 1 and 255, inclusive.
Why use a 16-bit value, and in particular a signed one? That makes
absolutely no sense at all.
These fit perfectly in a "u8" so use that instead.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists