[RFA] New substitute-path commands

Joel Brobecker brobecker@adacore.com
Thu Jul 6 04:46:00 GMT 2006


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

Because I didn't pay attention ? That was an oversight on my part.
Good catch, thanks.

-- 
Joel



More information about the Gdb-patches mailing list