summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2002-06-28 01:10:49 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2002-06-28 01:10:49 +0000
commit469eb728a6ab385820d4f0d04c59a89ec812e770 (patch)
tree0f727930287d1191a3e91d1eb10a95d373312efb /lib
parent8710a799430257f81f83cc66a8b0c324bc78ac69 (diff)
Lies, damn lies and getcap(3). The description for cgetclose() was
completely wrong and has apparently caused people to believe that cgetclose() frees memory allocated by cgetent() which is *not* the case.
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/gen/getcap.316
1 files changed, 12 insertions, 4 deletions
diff --git a/lib/libc/gen/getcap.3 b/lib/libc/gen/getcap.3
index be738d704d1..bb95582795a 100644
--- a/lib/libc/gen/getcap.3
+++ b/lib/libc/gen/getcap.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: getcap.3,v 1.22 2002/04/30 16:31:42 mpech Exp $
+.\" $OpenBSD: getcap.3,v 1.23 2002/06/28 01:10:48 millert Exp $
.\"
.\" Copyright (c) 1992, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -255,10 +255,18 @@ comments below).
Upon completion of database (0 return) the database is closed.
.Pp
.Fn cgetclose
-closes the sequential access and frees any memory and file descriptors
-being used.
+closes the file descriptor and resets state used for sequential access.
+If neither the
+.Fn cgetfirst
+nor the
+.Fn cgetnext
+functions have been called,
+.Fn cgetclose
+has no effect.
Note that it does not erase the buffer pushed by a call to
-.Fn cgetset .
+.Fn cgetset ,
+nor does it free the buffer allocated by
+.Fn cgetent.
.Pp
.Fn cgetusedb
allows the user to specify whether use or ignore database files ending in