diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | stream.c | 3 |
2 files changed, 7 insertions, 1 deletions
@@ -1,5 +1,10 @@ 2014-02-25 Kaz Kylheku <kaz@kylheku.com> + * stream.c (getcwd_wrap): Implement correct test of getcwd's + return value. + +2014-02-25 Kaz Kylheku <kaz@kylheku.com> + * configure: Use -Werror= on the missing prototypes and strict prototypes warnings; these should be errors. @@ -2424,7 +2424,8 @@ val getcwd_wrap(void) for (;;) { char *u8buf = (char *) chk_malloc(guess); - if (getcwd(u8buf, 256) < 0) { + + if (getcwd(u8buf, guess) == 0) { free(u8buf); if (errno != ERANGE) { uw_throwf(file_error_s, lit("getcwd: ~a/~s"), |