Xi Wang a3860c1c5d introduce SIZE_MAX
ULONG_MAX is often used to check for integer overflow when calculating
allocation size.  While ULONG_MAX happens to work on most systems, there
is no guarantee that `size_t' must be the same size as `long'.

This patch introduces SIZE_MAX, the maximum value of `size_t', to improve
portability and readability for allocation size validation.

Signed-off-by: Xi Wang <xi.wang@gmail.com>
Acked-by: Alex Elder <elder@dreamhost.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Pekka Enberg <penberg@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-05-31 17:49:26 -07:00
..
2010-08-10 08:20:20 +10:00
2012-05-22 10:54:30 +01:00
2012-04-27 09:29:35 +01:00
2012-05-31 17:49:26 -07:00
2011-05-09 09:14:45 +10:00
2012-05-22 10:54:16 +01:00
2011-02-07 13:09:42 +10:00
2012-05-17 20:14:48 +09:00
2012-03-10 13:06:04 +00:00
2011-03-31 11:26:23 -03:00
2011-03-31 11:26:23 -03:00