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]

[gcov] Fix thinko


Hi,
I've installed this thinko patch to my previous checkin.
Thanks to Andrew for pointing out another case.

booted & tested on i686-pc-linux-gnu.

nathan
--
Nathan Sidwell    ::   http://www.codesourcery.com   ::     CodeSourcery LLC
         The voices in my head said this was stupid too
nathan@codesourcery.com    ::     http://www.planetfall.pwp.blueyonder.co.uk

2003-05-18  Nathan Sidwell  <nathan@codesourcery.com>

	* gcov-io.c (gcov_read_bytes): Fix fread thinko.

Index: gcov-io.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/gcov-io.c,v
retrieving revision 1.6
diff -c -3 -p -r1.6 gcov-io.c
*** gcov-io.c	14 May 2003 16:01:19 -0000	1.6
--- gcov-io.c	18 May 2003 11:16:21 -0000
*************** gcov_read_bytes (unsigned bytes)
*** 369,375 ****
  	gcov_allocate (gcov_var.length + bytes);
        excess = gcov_var.alloc - gcov_var.length;
  #endif
!       excess = fread (gcov_var.buffer + gcov_var.offset,
  		      1, excess, gcov_var.file);
        gcov_var.length += excess;
        if (gcov_var.length < bytes)
--- 369,375 ----
  	gcov_allocate (gcov_var.length + bytes);
        excess = gcov_var.alloc - gcov_var.length;
  #endif
!       excess = fread (gcov_var.buffer + gcov_var.length,
  		      1, excess, gcov_var.file);
        gcov_var.length += excess;
        if (gcov_var.length < bytes)

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