[flac-dev] [PATCH] cpu.c: initialize a variable
Erik de Castro Lopo
mle+la at mega-nerd.com
Mon Oct 12 00:21:44 PDT 2015
lvqcl wrote:
> Some debugging tools don't like if a code uses unitialized variables.
> The code in cpu.c uses the value of fxsr.buff[50], so it makes sense
> to explicitely initialize it (because fxsave can fail to do it).
Your change:
fxsr.buff[50] = 0;
only changes one element in that 128 work buffer. Why explicitly initialize
onky the 50th element and not all of them?
My approach would be:
memset (fxsr.buff, 0, sizeof (fxsr.buff));
What do you think?
Erik
--
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-nerd.com/
More information about the flac-dev
mailing list