]> Savannah Git Hosting - gnulib.git/commitdiff
fchdir: Improve documentation.
authorBruno Haible <bruno@clisp.org>
Sat, 27 Jun 2020 00:44:38 +0000 (02:44 +0200)
committerBruno Haible <bruno@clisp.org>
Sat, 27 Jun 2020 00:45:06 +0000 (02:45 +0200)
* lib/fchdir.c (get_name, _gl_register_fd): Document the failure return
convention.

ChangeLog
lib/fchdir.c

index 932993a7fcce4adff73d230eafc1ac627fd2aa08..c047c411ca1b6d45f59bb1aa12c55383257e0c44 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+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.
index 20ecd3c17b0d3f08703c28906379f0c9b06cc1c3..1fa9a7edc6b3662b45b8c5733811e21fc2d12b52 100644 (file)
@@ -84,7 +84,8 @@ ensure_dirs_slot (size_t fd)
   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)
 {
@@ -125,8 +126,8 @@ _gl_unregister_fd (int fd)
 /* 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)
 {