diff options
author | Otto Moerbeek <otto@cvs.openbsd.org> | 2006-04-02 18:22:15 +0000 |
---|---|---|
committer | Otto Moerbeek <otto@cvs.openbsd.org> | 2006-04-02 18:22:15 +0000 |
commit | 0cf0e1b2af1052634bc3b0d5ed817cc78cfd2040 (patch) | |
tree | 2ec8566e5419a773da762191c1d867c742a6ed0c /lib/libc/stdlib/malloc.3 | |
parent | c819e5c934e9e280442605dc97e45aa9833cf353 (diff) |
Use SIZE_MAX instead of SIZE_T_MAX, the latter is not POSIX and
remove redundant check on size. ok millert@ deraadt@
Diffstat (limited to 'lib/libc/stdlib/malloc.3')
-rw-r--r-- | lib/libc/stdlib/malloc.3 | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/stdlib/malloc.3 b/lib/libc/stdlib/malloc.3 index 24e6b3bc53b..11318d7ce27 100644 --- a/lib/libc/stdlib/malloc.3 +++ b/lib/libc/stdlib/malloc.3 @@ -30,7 +30,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $OpenBSD: malloc.3,v 1.43 2006/03/26 19:56:08 ray Exp $ +.\" $OpenBSD: malloc.3,v 1.44 2006/04/02 18:22:14 otto Exp $ .\" .Dd August 27, 1996 .Dt MALLOC 3 @@ -100,7 +100,7 @@ If .Fn malloc must be used, be sure to test for overflow: .Bd -literal -offset indent -if (num && size && SIZE_T_MAX / num < size) { +if (num && SIZE_MAX / num < size) { errno = ENOMEM; err(1, "overflow"); } |