From: Bruno Haible Date: Sat, 27 Jun 2020 00:59:07 +0000 (+0200) Subject: getcwd: Improve documentation. X-Git-Tag: v1.0~3964 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=e75484521cc31641f8e6855a7317988af30cf989;p=gnulib.git getcwd: Improve documentation. * lib/getcwd.c (__getcwd): Document the failure return convention. --- diff --git a/ChangeLog b/ChangeLog index c047c411ca..49422d39b2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2020-06-26 Bruno Haible + + getcwd: Improve documentation. + * lib/getcwd.c (__getcwd): Document the failure return convention. + 2020-06-26 Bruno Haible fchdir: Improve documentation. diff --git a/lib/getcwd.c b/lib/getcwd.c index 45470fcbe9..1a42ef1bfa 100644 --- a/lib/getcwd.c +++ b/lib/getcwd.c @@ -133,10 +133,10 @@ getcwd_nothrow (char *buf, size_t size) #endif /* Get the name of the current working directory, and put it in SIZE - bytes of BUF. Returns NULL if the directory couldn't be determined or - SIZE was too small. If successful, returns BUF. In GNU, if BUF is - NULL, an array is allocated with 'malloc'; the array is SIZE bytes long, - unless SIZE == 0, in which case it is as big as necessary. */ + bytes of BUF. Returns NULL with errno set if the directory couldn't be + determined or SIZE was too small. If successful, returns BUF. In GNU, + if BUF is NULL, an array is allocated with 'malloc'; the array is SIZE + bytes long, unless SIZE == 0, in which case it is as big as necessary. */ char * __getcwd (char *buf, size_t size)