summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/ChangeLog5
-rw-r--r--lib/vasprintf.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/lib/ChangeLog b/lib/ChangeLog
index 3aea319..265db39 100644
--- a/lib/ChangeLog
+++ b/lib/ChangeLog
@@ -1,3 +1,8 @@
+2001-05-01 Bruno Haible <haible@clisp.cons.org>
+
+ * vasprintf.c (int_vasprintf): Upon allocation failure, return -1,
+ not 0, to be consistent with glibc documentation.
+
2001-05-02 Bruno Haible <haible@clisp.cons.org>
* linebreak.c (iconv_string_keeping_offsets): Work around a glibc-2.1
diff --git a/lib/vasprintf.c b/lib/vasprintf.c
index f5b28f4..1c2a085 100644
--- a/lib/vasprintf.c
+++ b/lib/vasprintf.c
@@ -123,7 +123,7 @@ int_vasprintf (result, format, args)
if (*result != NULL)
return vsprintf (*result, format, *args);
else
- return 0;
+ return -1;
}
int