2004-07-17 Andrew Cagney <cagney@gnu.org>
* utils.c (xvasprintf): Call xstrvprintf.
This commit is contained in:
parent
c4a172b506
commit
a552edd94e
2 changed files with 3 additions and 11 deletions
|
@ -1,5 +1,7 @@
|
||||||
2004-07-17 Andrew Cagney <cagney@gnu.org>
|
2004-07-17 Andrew Cagney <cagney@gnu.org>
|
||||||
|
|
||||||
|
* utils.c (xvasprintf): Call xstrvprintf.
|
||||||
|
|
||||||
* parse.c: Update copyright.
|
* parse.c: Update copyright.
|
||||||
(null_post_parser): Eliminate ARGSUSED.
|
(null_post_parser): Eliminate ARGSUSED.
|
||||||
|
|
||||||
|
|
12
gdb/utils.c
12
gdb/utils.c
|
@ -1173,17 +1173,7 @@ xasprintf (char **ret, const char *format, ...)
|
||||||
void
|
void
|
||||||
xvasprintf (char **ret, const char *format, va_list ap)
|
xvasprintf (char **ret, const char *format, va_list ap)
|
||||||
{
|
{
|
||||||
int status = vasprintf (ret, format, ap);
|
(*ret) = xstrvprintf (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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
char *
|
char *
|
||||||
|
|
Loading…
Add table
Reference in a new issue