summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2004-07-17 14:42:29 +0000
committerAndrew Cagney <cagney@redhat.com>2004-07-17 14:42:29 +0000
commit1e6ab168d7a83d7de208b4763a1a1e268d5e777e (patch)
tree34150accbbf62f6b743aed6f18c26fb74ebb6e11
parent492d8bd35fea822321a5e186b3eddd68c1666614 (diff)
downloadgdb-1e6ab168d7a83d7de208b4763a1a1e268d5e777e.tar.gz
2004-07-17 Andrew Cagney <cagney@gnu.org>
* utils.c (xvasprintf): Call xstrvprintf.
-rw-r--r--gdb/utils.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/gdb/utils.c b/gdb/utils.c
index 409e0bc568a..1c7d1f471e5 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -1173,17 +1173,7 @@ xasprintf (char **ret, const char *format, ...)
void
xvasprintf (char **ret, const char *format, va_list ap)
{
- int status = vasprintf (ret, format, ap);
- /* NULL could be returned due to a memory allocation problem; a
- badly format string; or something else. */
- if ((*ret) == NULL)
- internal_error (__FILE__, __LINE__,
- "vasprintf returned NULL buffer (errno %d)", errno);
- /* A negative status with a non-NULL buffer shouldn't never
- happen. But to be sure. */
- if (status < 0)
- internal_error (__FILE__, __LINE__,
- "vasprintf call failed (errno %d)", errno);
+ (*ret) = xstrvprintf (format, ap);
}
char *