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: charset __FUNCTION__ patch


On Fri, May 28, 2004 at 02:58:21PM -0700, Zack Weinberg wrote:
> Aldy Hernandez <aldyh@redhat.com> writes:
> 
> > !       namep = (char *) xcalloc (strlen (name) + 1, sizeof (char));
> > !       namep = xstrdup (name);
> 
> You don't need the xcalloc here.

Bahhh!  Sorry.  Fixed, and committed.

-- 
Will hack for surf.

	* c-common.c (fname_as_string): Fix xcalloc to xmalloc.

Index: c-common.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/c-common.c,v
retrieving revision 1.504
diff -c -p -r1.504 c-common.c
*** c-common.c	28 May 2004 21:56:58 -0000	1.504
--- c-common.c	28 May 2004 22:04:33 -0000
*************** fname_as_string (int pretty_p)
*** 1119,1125 ****
      }
    else
      {
!       namep = (char *) xcalloc (strlen (name) + 1, sizeof (char));
        namep = xstrdup (name);
      }
  
--- 1119,1125 ----
      }
    else
      {
!       namep = xmalloc (strlen (name) + 1);
        namep = xstrdup (name);
      }
  


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