Changeset c1f0c1d for src/io


Ignore:
Timestamp:
Feb 3, 2014, 8:21:11 PM (10 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
Children:
4013382c
Parents:
bc6c1a7
Message:

src/io/source_wavread.c: avoid calling fclose twice, print an error if fclose fails

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/io/source_wavread.c

    rbc6c1a7 rc1f0c1d  
    348348
    349349uint_t aubio_source_wavread_close (aubio_source_wavread_t * s) {
    350   if (!s->fid || fclose(s->fid)) {
     350  if (!s->fid) {
    351351    return AUBIO_FAIL;
    352352  }
     353  if (fclose(s->fid)) {
     354    AUBIO_ERR("source_wavread: could not close %s (%s)\n", s->path, strerror(errno));
     355    return AUBIO_FAIL;
     356  }
     357  s->fid = NULL;
    353358  return AUBIO_OK;
    354359}
Note: See TracChangeset for help on using the changeset viewer.