Minor cleanup of tests/(a|u)law_test.c.

This commit is contained in:
Erik de Castro Lopo 2004-07-31 00:51:56 +00:00
parent 5be1998d14
commit 1760de3e42
3 changed files with 10 additions and 5 deletions

View File

@ -1,3 +1,8 @@
2004-07-31 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
* tests/(a|u)law_test.c
Minor cleanup.
2004-07-29 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
* src/(pcm|float|double64|ulaw|alaw|xi).c

View File

@ -51,7 +51,7 @@ main (void)
sfinfo.frames = 123456789 ; /* Wrong length. Library should correct this on sf_close. */
sfinfo.channels = 1 ;
if (! (file = sf_open (filename, SFM_WRITE, &sfinfo)))
if ((file = sf_open (filename, SFM_WRITE, &sfinfo)) == NULL)
{ printf ("sf_open_write failed with error : ") ;
fflush (stdout) ;
puts (sf_strerror (NULL)) ;
@ -72,7 +72,7 @@ main (void)
** with what they should be.
*/
if (! (file = sf_open (filename, SFM_READ, &sfinfo)))
if ((file = sf_open (filename, SFM_READ, &sfinfo)) == NULL)
{ printf ("sf_open_write failed with error : ") ;
puts (sf_strerror (NULL)) ;
exit (1) ;

View File

@ -51,7 +51,7 @@ main (void)
sfinfo.frames = 123456789 ;
sfinfo.channels = 1 ;
if (! (file = sf_open (filename, SFM_WRITE, &sfinfo)))
if ((file = sf_open (filename, SFM_WRITE, &sfinfo)) == NULL)
{ printf ("sf_open_write failed with error : ") ;
fflush (stdout) ;
puts (sf_strerror (NULL)) ;
@ -72,7 +72,7 @@ main (void)
** with what they should be.
*/
if (! (file = sf_open (filename, SFM_READ, &sfinfo)))
if ((file = sf_open (filename, SFM_READ, &sfinfo)) == NULL)
{ printf ("sf_open_write failed with error : ") ;
puts (sf_strerror (NULL)) ;
exit (1) ;
@ -94,7 +94,7 @@ main (void)
sf_close (file) ;
printf (" alaw_test : encoder ... ok\n") ;
printf (" ulaw_test : encoder ... ok\n") ;
/* Now generate a file containing all possible 8 bit encoded
** sample values and write it to disk as ulaw encoded.frames.