On Wed, Jul 19, 2017 at 04:54:31PM +0200, Marek Polacek wrote:
> > --- a/gcc/selftest.c
> > +++ b/gcc/selftest.c
> > @@ -192,7 +192,14 @@ read_file (const location &loc, const char *path)
> >    fclose (f_in);
> >  
> >    /* 0-terminate the buffer.  */
> > +  if (total_sz == 0)
> > +    {
> > +      size_t new_alloc_sz = alloc_sz ? alloc_sz * 2: total_sz + 1;
> 
> There should be a space before ":".  Also, if you know total_sz is 0, why
> "total_sz + 1" and not just "1"?
> 
> > +      result = (char *)xrealloc (result, new_alloc_sz);
> 
> A space after ).

Or better
  result = XRESIZEVEC (char, result, new_alloc_sz); 
?

        Jakub

Reply via email to