From 7b4da3672d2a452e6d9ff4ca4ca4da6f0bbe3ed0 Mon Sep 17 00:00:00 2001 From: Andrew Cagney Date: Sat, 17 Jul 2004 14:42:01 +0000 Subject: [PATCH] 2004-07-17 Andrew Cagney * utils.c (xvasprintf): Call xstrvprintf. --- gdb/ChangeLog | 2 ++ gdb/utils.c | 12 +----------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 7130e4edce..1128f06bb5 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,7 @@ 2004-07-17 Andrew Cagney + * utils.c (xvasprintf): Call xstrvprintf. + * parse.c: Update copyright. (null_post_parser): Eliminate ARGSUSED. diff --git a/gdb/utils.c b/gdb/utils.c index fd3e287e84..10dddeb9af 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 * -- 2.11.0