diff options
author | Andrew Cagney <cagney@redhat.com> | 2004-07-17 14:42:01 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2004-07-17 14:42:01 +0000 |
commit | a552edd94e59b7a48ca6771d4a98276add3777c8 (patch) | |
tree | 07e66092bf207c25bbb6e37db00f5458345bf8f0 /gdb/utils.c | |
parent | c4a172b5060a9027e5a1c7bbddce356e6b3dada4 (diff) | |
download | gdb-a552edd94e59b7a48ca6771d4a98276add3777c8.zip gdb-a552edd94e59b7a48ca6771d4a98276add3777c8.tar.gz gdb-a552edd94e59b7a48ca6771d4a98276add3777c8.tar.bz2 |
2004-07-17 Andrew Cagney <cagney@gnu.org>
* utils.c (xvasprintf): Call xstrvprintf.
Diffstat (limited to 'gdb/utils.c')
-rw-r--r-- | gdb/utils.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/gdb/utils.c b/gdb/utils.c index fd3e287..10dddeb 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 * |