Module Name: src
Committed By: pgoyette
Date: Wed Jun 1 05:40:27 UTC 2016
Modified Files:
src/lib/libc/stdlib: malloc.3
Log Message:
Document return value for realloc(3) when size is 0. From PR lib/47384
To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/lib/libc/stdlib/malloc.3
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/libc/stdlib/malloc.3
diff -u src/lib/libc/stdlib/malloc.3:1.46 src/lib/libc/stdlib/malloc.3:1.47
--- src/lib/libc/stdlib/malloc.3:1.46 Sat Nov 7 18:46:37 2015
+++ src/lib/libc/stdlib/malloc.3 Wed Jun 1 05:40:26 2016
@@ -1,4 +1,4 @@
-.\" $NetBSD: malloc.3,v 1.46 2015/11/07 18:46:37 wiz Exp $
+.\" $NetBSD: malloc.3,v 1.47 2016/06/01 05:40:26 pgoyette Exp $
.\"
.\" Copyright (c) 1980, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -34,7 +34,7 @@
.\" @(#)malloc.3 8.1 (Berkeley) 6/4/93
.\" $FreeBSD: src/lib/libc/stdlib/malloc.3,v 1.73 2007/06/15 22:32:33 jasone Exp $
.\"
-.Dd July 26, 2015
+.Dd June 1, 2016
.Dt MALLOC 3
.Os
.Sh NAME
@@ -144,6 +144,11 @@ The
.Fn realloc
function always leaves the original buffer intact
when an error occurs.
++If
++.Ar size
++is 0, either NULL or a pointer that can be safely passed to
++.Xr free 3
++is returned.
.Pp
The
.Fn free