mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-27 17:40:49 +00:00
merge from gcc
This commit is contained in:
@@ -79,7 +79,7 @@ fix_argv (char * const *argvec)
|
||||
|
||||
for (i = 0; argvec[i] != NULL; i++)
|
||||
;
|
||||
argv = xmalloc ((i + 1) * sizeof (char *));
|
||||
argv = XNEWVEC (char *, i + 1);
|
||||
for (i = 0; argvec[i] != NULL; i++)
|
||||
argv[i] = xstrdup (argvec[i]);
|
||||
argv[i] = NULL;
|
||||
@@ -105,7 +105,7 @@ fix_argv (char * const *argvec)
|
||||
{
|
||||
if (temp[j] == '"')
|
||||
{
|
||||
newtemp = xmalloc (len + 2);
|
||||
newtemp = XNEWVEC (char, len + 2);
|
||||
strncpy (newtemp, temp, j);
|
||||
newtemp [j] = '\\';
|
||||
strncpy (&newtemp [j+1], &temp [j], len-j);
|
||||
@@ -150,7 +150,7 @@ fix_argv (char * const *argvec)
|
||||
|
||||
len += 2; /* and for the enclosing quotes. */
|
||||
|
||||
temp = xmalloc (len + 1);
|
||||
temp = XNEWVEC (char, len + 1);
|
||||
temp[0] = '"';
|
||||
strcpy (temp + 1, argv[i]);
|
||||
if (trailing_backslash)
|
||||
|
||||
Reference in New Issue
Block a user