Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/stdlib Also: in the example EOVERFLOW is probably b...
details: https://anonhg.NetBSD.org/src/rev/5a5f2630c00b
branches: trunk
changeset: 754432:5a5f2630c00b
user: jruoho <jruoho%NetBSD.org@localhost>
date: Fri Apr 30 07:16:35 2010 +0000
description:
Also: in the example EOVERFLOW is probably better than ENOMEM.
diffstat:
lib/libc/stdlib/malloc.3 | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diffs (18 lines):
diff -r efc0398626c6 -r 5a5f2630c00b lib/libc/stdlib/malloc.3
--- a/lib/libc/stdlib/malloc.3 Fri Apr 30 07:14:15 2010 +0000
+++ b/lib/libc/stdlib/malloc.3 Fri Apr 30 07:16:35 2010 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: malloc.3,v 1.32 2010/04/30 07:14:15 jruoho Exp $
+.\" $NetBSD: malloc.3,v 1.33 2010/04/30 07:16:35 jruoho Exp $
.\"
.\" Copyright (c) 1980, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -96,7 +96,7 @@
must be used, be sure to test for overflow:
.Bd -literal -offset indent
if (size && number > SIZE_MAX / size) {
- errno = ENOMEM;
+ errno = EOVERFLOW;
err(EXIT_FAILURE, "overflow");
}
.Ed
Home |
Main Index |
Thread Index |
Old Index