summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorXi Wang <xi.wang@gmail.com>2012-05-31 16:26:04 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-07-31 12:54:53 -0700
commitb06b5c6204bdc7c571feedb6b16188ba62feb9a6 (patch)
tree91f752326bfe880af1170cc9a9a55b8af21c7e50 /Makefile
parent883ea134ae75eb03c9f08553a81957a808cee96b (diff)
introduce SIZE_MAX
commit a3860c1c5dd1137db23d7786d284939c5761d517 upstream. 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> Cc: Qiang Huang <h.huangqiang@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'Makefile')
0 files changed, 0 insertions, 0 deletions