This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] New substitute-path commands


> 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?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]