1
0
mirror of https://github.com/simh/simh.git synced 2026-01-25 11:46:37 +00:00

TAPE: Add tests and Coverity cleanups

This commit is contained in:
Mark Pizzolato
2019-03-19 10:24:28 -07:00
parent 3840765c63
commit f09e9c290a
4 changed files with 369 additions and 59 deletions

View File

@@ -205,9 +205,11 @@ t_offset pos, sz;
if (fp == NULL)
return 0;
pos = sim_ftell (fp);
sim_fseeko (fp, 0, SEEK_END);
if (sim_fseeko (fp, 0, SEEK_END))
return 0;
sz = sim_ftell (fp);
sim_fseeko (fp, pos, SEEK_SET);
if (sim_fseeko (fp, pos, SEEK_SET))
return 0;
return sz;
}