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 for cppfiles.c


Douglas B. Rupp wrote:-

> > Please approve.

No, it looks wrong.

> Sorry, I have had my morning caffeine. Here's the patch.

Please use mime type text/x-patch or similar, not octet stream.


  		  if (!STAT_SIZE_TOO_BIG (inc->st))
  		    cpp_warning
  		      (pfile, "%s is shorter than expected", inc->name);
! 		  size = offset + 1;
! 		  buf = xrealloc (buf, size);
  		  inc->st.st_size = offset;
  		  break;
  		}

I think this should be

! 		  size = offset;
! 		  buf = xrealloc (buf, size + 1);

OK if you agree.

Neil.


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