sndfile.c : Make the return value of sf_error() match the API documentation.

This commit is contained in:
Erik de Castro Lopo 2005-12-07 09:49:12 +00:00
parent 1f8e0d7334
commit 01321f6620
2 changed files with 11 additions and 2 deletions

View File

@ -1,3 +1,12 @@
2005-12-07 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
* examples/list_formats.c
Make sure the SF_INFO struct is memset to all zero before being used.
Thanks to Stephen F. Booth.
* src/sndfile.c
Make the return value of sf_error() match the API documentation.
2005-11-19 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
* examples/sndfile-convert.c

View File

@ -489,14 +489,14 @@ sf_error (SNDFILE *sndfile)
if (! sndfile)
{ if (sf_error != 0)
return 1 ;
return sf_error ;
return 0 ;
} ;
VALIDATE_SNDFILE_AND_ASSIGN_PSF (sndfile, psf, 0) ;
if (psf->error)
return 1 ;
return psf->error ;
return 0 ;
} /* sf_error */