diff options
author | nathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-07-29 08:58:59 +0000 |
---|---|---|
committer | nathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-07-29 08:58:59 +0000 |
commit | 421055caa5d450505d0fbf6a472dace6c3f12f9e (patch) | |
tree | 16726bd91201d3686e4da590f47456b9a7153c9d /gcc/gcov.c | |
parent | f0376c19272666256dece44da813084d8e78cb5e (diff) | |
download | gcc-421055caa5d450505d0fbf6a472dace6c3f12f9e.tar.gz |
* gcov-io.h: Allow zero tag as EOF indicator.
(gcov_is_eof): Remove.
(gcov_truncate): Remove.
* gcov-io.c (gcov_seek): Always SEEK_SET.
* libgcov.c (gcov_exit): Don't use gcov_truncate. Write explicit
EOF tag.
* coverage.c (read_counts_file): Don't use gcov_is_eof.
* gcov-dump.c (dump_file): Likewise.
* gcov.c (read_graph_file, read_count_file): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@85291 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gcov.c')
-rw-r--r-- | gcc/gcov.c | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/gcc/gcov.c b/gcc/gcov.c index c53c4f20a2e..c988730e38a 100644 --- a/gcc/gcov.c +++ b/gcc/gcov.c @@ -896,14 +896,12 @@ read_graph_file (void) } gcov_sync (base, length); if (gcov_is_error ()) - break; - } - if (!gcov_is_eof ()) - { - corrupt:; - fnotice (stderr, "%s:corrupted\n", bbg_file_name); - gcov_close (); - return 1; + { + corrupt:; + fnotice (stderr, "%s:corrupted\n", bbg_file_name); + gcov_close (); + return 1; + } } gcov_close (); @@ -1055,14 +1053,11 @@ read_count_file (void) } gcov_sync (base, length); if ((error = gcov_is_error ())) - break; - } - - if (!gcov_is_eof ()) - { - fnotice (stderr, error < 0 ? "%s:overflowed\n" : "%s:corrupted\n", - da_file_name); - goto cleanup; + { + fnotice (stderr, error < 0 ? "%s:overflowed\n" : "%s:corrupted\n", + da_file_name); + goto cleanup; + } } gcov_close (); |