This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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: [PATCH, committed] xcoffout_declare_function strip encoding


On Mon, Dec 13, 2004 at 02:53:52PM -0500, David Edelsohn wrote:
> !   len = strlen (name);
> !   if (name[len - 1] == ']')
> !     {
> !       char *n = alloca (len - 3);
> !       strncpy (n, name, len - 4);

memcpy would be better.  You know there are no embedded nulls.


r~


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