about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--manual/filesys.texi11
2 files changed, 11 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 06b6836546..ba7384fd3e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2000-03-10  Andreas Jaeger  <aj@suse.de>
 
+	* manual/filesys.texi (Working Directory): Fix last patch.
+	Patch by Martin Buchholz  <martin@xemacs.org>.
+
+2000-03-10  Andreas Jaeger  <aj@suse.de>
+
 	* manual/creature.texi (Feature Test Macros): Fix language.
 
 2000-03-10  Roland McGrath  <roland@baalperazim.frob.com>
diff --git a/manual/filesys.texi b/manual/filesys.texi
index e2c9ffb432..0f27cfcfd9 100644
--- a/manual/filesys.texi
+++ b/manual/filesys.texi
@@ -91,17 +91,18 @@ using only the standard behavior of @code{getcwd}:
 
 @smallexample
 char *
-gnu_getcwd (size_t size)
+gnu_getcwd ()
 @{
+  size_t size = 100;
+
   while (1)
     @{
       char *buffer = (char *) xmalloc (size);
-      char *value = getcwd (buffer, size);
-      if (value == buffer)
-        return value;
+      if (getcwd (buffer, size) == buffer)
+	return buffer;
       free (buffer);
       if (errno != ERANGE)
-        return value;
+        return 0;
       size *= 2;
     @}
 @}