mirror of https://github.com/torvalds/linux.git
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> |
||
|---|---|---|
| .. | ||
| i2c | ||
| ttm | ||
| Kbuild | ||
| drm.h | ||
| drmP.h | ||
| drm_buffer.h | ||
| drm_cache.h | ||
| drm_core.h | ||
| drm_crtc.h | ||
| drm_crtc_helper.h | ||
| drm_dp_helper.h | ||
| drm_edid.h | ||
| drm_encoder_slave.h | ||
| drm_fb_helper.h | ||
| drm_fixed.h | ||
| drm_fourcc.h | ||
| drm_global.h | ||
| drm_hashtab.h | ||
| drm_mem_util.h | ||
| drm_memory.h | ||
| drm_mm.h | ||
| drm_mode.h | ||
| drm_os_linux.h | ||
| drm_pciids.h | ||
| drm_sarea.h | ||
| drm_sysfs.h | ||
| drm_usb.h | ||
| exynos_drm.h | ||
| gma_drm.h | ||
| i810_drm.h | ||
| i915_drm.h | ||
| intel-gtt.h | ||
| mga_drm.h | ||
| nouveau_drm.h | ||
| r128_drm.h | ||
| radeon_drm.h | ||
| savage_drm.h | ||
| sis_drm.h | ||
| via_drm.h | ||
| vmwgfx_drm.h | ||