From 518dda6b8f41a612a22f2b768ea18b0432bb5aa6 Mon Sep 17 00:00:00 2001 From: danger Date: Sun, 6 Jul 2008 12:17:53 +0000 Subject: - Add description about a missing return value PR: docs/75995 Submitted by: Tarc MFC after: 3 days --- lib/libc/stdlib/hcreate.3 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'lib/libc') diff --git a/lib/libc/stdlib/hcreate.3 b/lib/libc/stdlib/hcreate.3 index 38743af..6065f18 100644 --- a/lib/libc/stdlib/hcreate.3 +++ b/lib/libc/stdlib/hcreate.3 @@ -111,8 +111,10 @@ is called. .Sh RETURN VALUES The .Fn hcreate -function returns 0 if it cannot allocate sufficient space for the table; -otherwise, it returns non-zero. +function returns 0 if the table creation failed and the global variable +.Va errno +is set to indicate the error; +otherwise, a non-zero value is returned. .Pp The .Fn hdestroy @@ -199,6 +201,8 @@ functions may fail if: .Bl -tag -width Er .It Bq Er ENOMEM Insufficient storage space is available. +.It Bq Er EINVAL +A table already exists. .El .Sh SEE ALSO .Xr bsearch 3 , -- cgit v1.1