fseek(datafile, DATA_OFFSET_DATA_START, SEEK_SET);
if (feof(datafile))
return PARSE_E_OUT_OF_RANGE;
+ if (ferror(datafile))
+ return PARSE_E_CANT_READ;
r = fread(raw, SEGMENT_SIZE, 1, datafile);
if (r != 1)
fseek(datafile, DATA_OFFSET_SAMPLING_RATE, SEEK_SET);
if (feof(datafile))
return PARSE_E_OUT_OF_RANGE;
+ if (ferror(datafile))
+ return PARSE_E_CANT_READ;
r = fread(raw, SEGMENT_SIZE, 1, datafile);
if (r != 1)
fseek(datafile, offset, SEEK_SET);
if (feof(datafile))
return PARSE_E_OUT_OF_RANGE;
+ if (ferror(datafile))
+ return PARSE_E_CANT_READ;
r = fread(&str_length, SMALL_SEGMENT_SIZE, 1, datafile);
if (r != 1)