+2020-06-26 Bruno Haible <bruno@clisp.org>
+
+ fchdir: Improve documentation.
+ * lib/fchdir.c (get_name, _gl_register_fd): Document the failure return
+ convention.
+
2020-06-26 Bruno Haible <bruno@clisp.org>
filenamecat-lgpl: Set errno upon failure.
return true;
}
-/* Return an absolute name of DIR in malloc'd storage. */
+/* Return an absolute name of DIR in malloc'd storage.
+ Upon failure, return NULL with errno set. */
static char *
get_name (char const *dir)
{
/* Mark FD as visiting FILENAME. FD must be non-negative, and refer
to an open file descriptor. If REPLACE_OPEN_DIRECTORY is non-zero,
this should only be called if FD is visiting a directory. Close FD
- and return -1 if there is insufficient memory to track the
- directory name; otherwise return FD. */
+ and return -1 with errno set if there is insufficient memory to track
+ the directory name; otherwise return FD. */
int
_gl_register_fd (int fd, const char *filename)
{