summaryrefslogtreecommitdiff
path: root/gcc/gcov-io.c
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@codesourcery.com>2004-07-29 08:58:59 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2004-07-29 08:58:59 +0000
commit00cf2913f841cf835b44febec958831e74d42dea (patch)
tree16726bd91201d3686e4da590f47456b9a7153c9d /gcc/gcov-io.c
parentd815ea49f655071a199c1dae851f0849bdf9d711 (diff)
downloadgcc-00cf2913f841cf835b44febec958831e74d42dea.tar.gz
gcov-io.h: Allow zero tag as EOF indicator.
* 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. From-SVN: r85291
Diffstat (limited to 'gcc/gcov-io.c')
-rw-r--r--gcc/gcov-io.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/gcov-io.c b/gcc/gcov-io.c
index 0f61ef06fce..3b4dcd60265 100644
--- a/gcc/gcov-io.c
+++ b/gcc/gcov-io.c
@@ -514,8 +514,7 @@ gcov_sync (gcov_position_t base, gcov_unsigned_t length)
#endif
#if IN_LIBGCOV
-/* Move to the a set position in a gcov file. BASE is zero to move to
- the end, and nonzero to move to that position. */
+/* Move to the a set position in a gcov file. */
GCOV_LINKAGE void
gcov_seek (gcov_position_t base)
@@ -523,7 +522,7 @@ gcov_seek (gcov_position_t base)
GCOV_CHECK_WRITING ();
if (gcov_var.offset)
gcov_write_block (gcov_var.offset);
- fseek (gcov_var.file, base << 2, base ? SEEK_SET : SEEK_END);
+ fseek (gcov_var.file, base << 2, SEEK_SET);
gcov_var.start = ftell (gcov_var.file) >> 2;
}
#endif