aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorXi Wang <[email protected]>2012-05-31 16:26:04 -0700
committerLinus Torvalds <[email protected]>2012-05-31 17:49:26 -0700
commita3860c1c5dd1137db23d7786d284939c5761d517 (patch)
tree48d688c6c391ef45f79bdd60815450ca06c5cc1a /tools/perf/scripts/python
parent15837294d4ce717f69942f7366e99d4d1d3d9923 (diff)
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 <[email protected]> Acked-by: Alex Elder <[email protected]> Cc: David Airlie <[email protected]> Cc: Pekka Enberg <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions