Package: manpages-dev
Version: 5.06-1
Severity: normal

Reading manual:

"""
int hsearch_r(ENTRY item, ACTION action, ENTRY **retval,
              struct hsearch_data *htab);


Return Value:

hsearch_r() returns nonzero on success, and 0 on error. 


Errors:

hsearch() and hsearch_r() can fail for the following reasons:
ENOMEM

action was ENTER, key was not found in the table, and there was no room in the 
table to add a new entry.

ESRCH

action was FIND, and key was not found in the table. 
"""


Well, there are few issues.

if hsearch_r returns 0 on error, how are the "reasons" indicated back to
the caller? The manpage doesn't say anything about it.

Also I would expect the EINVAL to be returned by hsearch_r when htab is
NULL. Or maybe state that behaviour is undefined if the htab is not a
result returned by previous hcreate_r call.


Regards,
Witold



-- System Information:
Debian Release: bullseye/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'unstable'), (1, 
'experimental-debug'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.5.0-2-amd64 (SMP w/12 CPU cores)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, 
TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages manpages-dev depends on:
ii  manpages  5.06-1

manpages-dev recommends no packages.

Versions of packages manpages-dev suggests:
ii  man-db [man-browser]  2.9.1-1

-- no debconf information

Reply via email to