summaryrefslogtreecommitdiff
path: root/libiberty
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2005-09-27 15:21:13 +0000
committerMark Mitchell <mark@codesourcery.com>2005-09-27 15:21:13 +0000
commit483aadb6d36578f19dc168f85a13f0c054b5e636 (patch)
treec1b568e1484ec46e4a218b46fc0ecff70336b5c1 /libiberty
parent0b88b162a32a86e0a357fcf5469bb8a13332d754 (diff)
downloadgdb-483aadb6d36578f19dc168f85a13f0c054b5e636.tar.gz
* argv.c (expandargv): Do not use xmalloc_failed.
Diffstat (limited to 'libiberty')
-rw-r--r--libiberty/ChangeLog4
-rw-r--r--libiberty/argv.c7
2 files changed, 8 insertions, 3 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog
index dcd24502afa..5aa21740578 100644
--- a/libiberty/ChangeLog
+++ b/libiberty/ChangeLog
@@ -1,3 +1,7 @@
+2005-09-27 Mark Mitchell <mark@codesourcery.com>
+
+ * argv.c (expandargv): Do not use xmalloc_failed.
+
2005-09-26 Mark Mitchell <mark@codesourcery.com>
* argv.c (safe-ctype.h): Include it.
diff --git a/libiberty/argv.c b/libiberty/argv.c
index 71f164acf7d..79241b6dce7 100644
--- a/libiberty/argv.c
+++ b/libiberty/argv.c
@@ -365,9 +365,10 @@ expandargv (argcp, argvp)
{
*argvp = dupargv (*argvp);
if (!*argvp)
- /* We do not know exactly many bytes dupargv tried to
- allocate, so make a guess. */
- xmalloc_failed (*argcp * 32);
+ {
+ fputs ("\nout of memory\n", stderr);
+ xexit (1);
+ }
}
/* Count the number of arguments. */
file_argc = 0;