Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[.joined/src/trunk]: .joined/src/lib/libc/stdlib ptsname(3): fix equivalence ...



details:   https://anonhg.NetBSD.org/.joined/src/rev/a93ce55b7c56
branches:  trunk
changeset: 359400:a93ce55b7c56
user:      uwe <uwe%NetBSD.org@localhost>
date:      Sun Jan 02 03:46:40 2022 +0000

description:
ptsname(3): fix equivalence example

The buffer is static, don't make it appear that we are returning a
pointer to a local variable.

diffstat:

 lib/libc/stdlib/ptsname.3 |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 287bf12e103a -r a93ce55b7c56 lib/libc/stdlib/ptsname.3
--- a/lib/libc/stdlib/ptsname.3 Sun Jan 02 03:23:55 2022 +0000
+++ b/lib/libc/stdlib/ptsname.3 Sun Jan 02 03:46:40 2022 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: ptsname.3,v 1.12 2018/02/07 11:16:05 pgoyette Exp $
+.\" $NetBSD: ptsname.3,v 1.13 2022/01/02 03:46:40 uwe Exp $
 .\"
 .\" Copyright (c) 2004 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd February 7, 2018
+.Dd January 2, 2022
 .Dt PTSNAME 3
 .Os
 .Sh NAME
@@ -136,7 +136,7 @@
 .Fn ptsname
 function is equivalent to:
 .Bd -literal
-       struct ptmget pm;
+       static struct ptmget pm;
        return ioctl(masterfd, TIOCPTSNAME, &pm) == -1 ? NULL : pm.sn;
 .Ed
 .Pp



Home | Main Index | Thread Index | Old Index