This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] New substitute-path commands
- From: Eli Zaretskii <eliz at gnu dot org>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Thu, 06 Jul 2006 06:31:03 +0300
- Subject: Re: [RFA] New substitute-path commands
- References: <20060705215606.GF3580@adacore.com>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> Date: Wed, 5 Jul 2006 14:56:06 -0700
> From: Joel Brobecker <brobecker@adacore.com>
>
> + new_path = (char *) malloc (strlen (path) + 1
> + + strlen (substitute_path_to)
> + - strlen (substitute_path_from));
> + strncpy (new_path, path, from_start - path);
Why did you use malloc instead of xmalloc here?