summaryrefslogtreecommitdiff
path: root/libiberty
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2010-01-10 01:19:02 +0000
committerH.J. Lu <hjl.tools@gmail.com>2010-01-10 01:19:02 +0000
commit2ce92dfc60af4ef26771a319bf078bc926206fd6 (patch)
tree02e9a8e83861c7fb28e537658fd00e2762da3ac1 /libiberty
parent70baa6be42b2c79f34dbdb1ac049e2005a3ffb88 (diff)
downloadgdb-2ce92dfc60af4ef26771a319bf078bc926206fd6.tar.gz
Return dgs.alc on success
2010-01-09 Ian Lance Taylor <iant@google.com> PR other/42230 * cp-demangle.c (d_demangle): Return dgs.alc on success.
Diffstat (limited to 'libiberty')
-rw-r--r--libiberty/ChangeLog5
-rw-r--r--libiberty/cp-demangle.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog
index c3d8f196b27..effb327ea22 100644
--- a/libiberty/ChangeLog
+++ b/libiberty/ChangeLog
@@ -1,3 +1,8 @@
+2010-01-09 Ian Lance Taylor <iant@google.com>
+
+ PR other/42230
+ * cp-demangle.c (d_demangle): Return dgs.alc on success.
+
2010-01-04 Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
PR target/42316
diff --git a/libiberty/cp-demangle.c b/libiberty/cp-demangle.c
index 43cf34a36cf..d37c90efc2d 100644
--- a/libiberty/cp-demangle.c
+++ b/libiberty/cp-demangle.c
@@ -4777,7 +4777,7 @@ d_demangle (const char *mangled, int options, size_t *palc)
return NULL;
}
- *palc = dgs.allocation_failure ? 1 : 0;
+ *palc = dgs.allocation_failure ? 1 : dgs.alc;
return dgs.buf;
}