diff options
author | DJ Delorie <dj@redhat.com> | 2005-05-24 21:01:33 +0000 |
---|---|---|
committer | DJ Delorie <dj@redhat.com> | 2005-05-24 21:01:33 +0000 |
commit | abf6a75b428517d9caaf9155212b0b10e0379a99 (patch) | |
tree | 3476694dba1d2c731deb2a131b0d8d6c5dcb0cd3 /libiberty/pex-win32.c | |
parent | f127898a4db12540b9898e25777c6c3725d119bf (diff) | |
download | gdb-abf6a75b428517d9caaf9155212b0b10e0379a99.zip gdb-abf6a75b428517d9caaf9155212b0b10e0379a99.tar.gz gdb-abf6a75b428517d9caaf9155212b0b10e0379a99.tar.bz2 |
merge from gcc
Diffstat (limited to 'libiberty/pex-win32.c')
-rw-r--r-- | libiberty/pex-win32.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libiberty/pex-win32.c b/libiberty/pex-win32.c index 751e3e0..10262fb 100644 --- a/libiberty/pex-win32.c +++ b/libiberty/pex-win32.c @@ -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) |