hsearch.3: Update ERRORS section

EINVAL can occur for hdestroy_r().
EINVAL can't occur for hcreate().
Other minor fixes.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Seonghun Lim 2011-09-09 20:35:13 +02:00 committed by Michael Kerrisk
parent 536bc96676
commit c658470df6
1 changed files with 3 additions and 12 deletions

View File

@ -32,7 +32,7 @@
.\" 2008-09-03, mtk, restructured somewhat, in part after suggestions from
.\" Timothy S. Nelson <wayland@wayland.id.au>
.\"
.TH HSEARCH 3 2008-10-06 "GNU" "Linux Programmer's Manual"
.TH HSEARCH 3 2011-09-10 "GNU" "Linux Programmer's Manual"
.SH NAME
hcreate, hdestroy, hsearch, hcreate_r, hdestroy_r,
hsearch_r \- hash table management
@ -190,23 +190,14 @@ cannot be found in the hash table.
returns nonzero on success, and 0 on error.
.SH ERRORS
.LP
.BR hcreate ()
and
.BR hcreate_r ()
and
.BR hdestroy_r ()
can fail for the following reasons:
.TP
.B EINVAL
.RB ( hcreate_r ())
.I htab
is NULL.
.TP
.B ENOMEM
Table full with \fIaction\fP set to \fBENTER\fP.
.TP
.B ESRCH
The \fIaction\fP argument is \fBFIND\fP and no corresponding element
is found in the table.
.\" hdestroy_r() can set errno to EINVAL if 'tab' is NULL.
.PP
.BR hsearch ()
and