Skip to content

Commit

Permalink
Remove memset()s made redundant by C99-style zero-initializations add…
Browse files Browse the repository at this point in the history
…ed in 3d91cc9
  • Loading branch information
musicinmybrain authored and SoapGentoo committed May 4, 2021
1 parent fb74006 commit b6a5dd6
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 8 deletions.
2 changes: 0 additions & 2 deletions src/generate-chirp.c
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,6 @@ generate_file (const char * filename, const PARAMS * params)
SF_INFO info = {} ;
double w0, w1 ;

memset (&info, 0, sizeof (info)) ;

info.format = params->format ;
info.samplerate = params->samplerate ;
info.channels = 1 ;
Expand Down
1 change: 0 additions & 1 deletion src/jackplay.c
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,6 @@ main (int argc, char * argv [])
} ;

/* Open the soundfile. */
memset (&sfinfo, 0, sizeof (sfinfo)) ;
sndfile = sf_open (filename, SFM_READ, &sfinfo) ;
if (sndfile == NULL)
{ fprintf (stderr, "Could not open soundfile '%s'\n", filename) ;
Expand Down
1 change: 0 additions & 1 deletion src/mix-to-mono.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ main (int argc, char ** argv)
exit (1) ;
} ;

memset (&sfinfo, 0, sizeof (sfinfo)) ;
if ((infile = sf_open (argv [argc - 2], SFM_READ, &sfinfo)) == NULL)
{ printf ("Error : Not able to open input file '%s'\n", argv [argc - 2]) ;
sf_close (infile) ;
Expand Down
2 changes: 0 additions & 2 deletions src/spectrogram.c
Original file line number Diff line number Diff line change
Expand Up @@ -900,8 +900,6 @@ render_sndfile (RENDER * render)
SNDFILE *infile ;
SF_INFO info = {} ;

memset (&info, 0, sizeof (info)) ;

infile = sf_open (render->sndfilepath, SFM_READ, &info) ;
if (infile == NULL)
{ printf ("Error : failed to open file '%s' : \n%s\n", render->sndfilepath, sf_strerror (NULL)) ;
Expand Down
2 changes: 0 additions & 2 deletions src/waveform.c
Original file line number Diff line number Diff line change
Expand Up @@ -949,8 +949,6 @@ render_sndfile (RENDER * render)
SF_INFO info = {} ;
sf_count_t max_width ;

memset (&info, 0, sizeof (info)) ;

infile = sf_open (render->sndfilepath, SFM_READ, &info) ;
if (infile == NULL)
{ printf ("Error: failed to open file '%s': \n%s\n", render->sndfilepath, sf_strerror (NULL)) ;
Expand Down

0 comments on commit b6a5dd6

Please sign in to comment.