From df646add9dde90130753c06938e425c8f8f39c0f Mon Sep 17 00:00:00 2001 From: Ralph Corderoy Date: Wed, 9 Aug 2017 17:03:24 +0100 Subject: [PATCH] leave_getfld(): Don't follow fseeko(SEEK_SET) with ftello(). If fseeko(3) didn't error then we know the stream's position and the ftello(3) is not needed. Set last_caller_pos to total_bytes_read instead. This small change is a commit to help future bisecting. --- sbr/m_getfld.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sbr/m_getfld.c b/sbr/m_getfld.c index 08d9eb09..48551ae5 100644 --- a/sbr/m_getfld.c +++ b/sbr/m_getfld.c @@ -472,8 +472,8 @@ leave_getfld (m_getfld_state_t s) { if (fseeko(s->iob, s->total_bytes_read, SEEK_SET) == -1) adios("getfld's iob", "failed to set offset: %ld", s->total_bytes_read); - if ((s->last_caller_pos = ftello(s->iob)) == -1) - adios("getfld's iob", "failed to get offset after seek"); + + s->last_caller_pos = s->total_bytes_read; } } -- 2.56.0