summary refs log tree commit diff
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2008-08-05 23:50:37 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2008-08-05 23:50:37 +0800
commitcc0e9399fd01f16ecb5ca49066da847e1d94f9ca (patch)
treeccbfcf67c09ac8d0cc158de110f4cdb2177e9b49
parent[MAN] Added missing right parenthesis (diff)
downloaddash-cc0e9399fd01f16ecb5ca49066da847e1d94f9ca.tar.gz
dash-cc0e9399fd01f16ecb5ca49066da847e1d94f9ca.zip
[CD] Fixed getcwd build error for the non-glibc case
On Sat, Aug 02, 2008 at 01:24:16AM +0200, Peter Hartlich wrote:
>
> dash's debian/diff/0048--CD-Restored-warning-when-getcwd-fails.diff
> contains the following lines:
>
> -     return getcwd(buf, sizeof(buf)) ? savestr(buf) : nullstr;
> +
> +     if (getcwd(buf, sizeof(buf))
> +             return savestr(buf);
>
> The if condition is missing a closing parenthesis, which probably went
> unnoticed because it occurs in a section only compiled if __GLIBC__ is
> not defined.

This patch adds the extra parenthesis.  Thanks Peter.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to '')
-rw-r--r--ChangeLog4
-rw-r--r--src/cd.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 261b445..0448a23 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2008-08-05  Herbert Xu <herbert@gondor.apana.org.au>
+
+	* Fixed getcwd build error for the non-glibc case.
+
 2008-06-13  Gerrit Pape <pape@smarden.org>
 
 	* Added missing right parenthesis in manual page.
diff --git a/src/cd.c b/src/cd.c
index 624801d..3770664 100644
--- a/src/cd.c
+++ b/src/cd.c
@@ -258,7 +258,7 @@ getpwd()
 #else
 	char buf[PATH_MAX];
 
-	if (getcwd(buf, sizeof(buf))
+	if (getcwd(buf, sizeof(buf)))
 		return savestr(buf);
 #endif