summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdlib/reallocarray.3
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/stdlib/reallocarray.3')
-rw-r--r--lib/libc/stdlib/reallocarray.315
1 files changed, 10 insertions, 5 deletions
diff --git a/lib/libc/stdlib/reallocarray.3 b/lib/libc/stdlib/reallocarray.3
index a85858c..8e714f4 100644
--- a/lib/libc/stdlib/reallocarray.3
+++ b/lib/libc/stdlib/reallocarray.3
@@ -1,6 +1,5 @@
-.\"
.\" Copyright (c) 1980, 1991, 1993
-.\">----The Regents of the University of California. All rights reserved.
+.\" The Regents of the University of California. All rights reserved.
.\"
.\" This code is derived from software contributed to Berkeley by
.\" the American National Standards Committee X3, on Information
@@ -44,6 +43,9 @@
.Sh DESCRIPTION
The
.Fn reallocarray
+function is similar to the
+.Fn realloc
+function
except it operates on
.Fa nmemb
members of size
@@ -53,8 +55,9 @@ and checks for integer overflow in the calculation
*
.Fa size .
.Sh RETURN VALUES
+The
.Fn reallocarray
-return a pointer to the allocated space; otherwise, a
+function returns a pointer to the allocated space; otherwise, a
.Dv NULL
pointer is returned and
.Va errno
@@ -132,6 +135,8 @@ if ((newp = reallocarray(p, num, size)) == NULL) {
.Xr realloc 3
.Sh HISTORY
The
-.Fn reallocf
+.Fn reallocarray
function first appeared in
-.Ox 5.6 .
+.Ox 5.6
+and
+.Fx 11.0 .
OpenPOWER on IntegriCloud