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.
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 (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;