[pulseaudio-discuss] [PATCH] bluetooth: Fix uninitialized variable.
Tanu Kaskinen
tanuk at iki.fi
Thu Mar 22 10:09:13 PDT 2012
On Thu, 2012-03-22 at 17:43 +0100, Dalleau, Frederic wrote:
> Hi Tanu,
>
> > - unsigned frame_count;
> > + unsigned frame_count = 0;
>
> Looks like frame_count is unused in this function, maybe it can be
> simply removed?
Yes, you're absolutely right. I was checking a report from Coverity that
said that frame_count was used uninitialized, and I saw that it indeed
was being incremented before initialization. It seems that the
incrementing was done only for the fun of doing so!
And I thought it was pointless to send this trivial patch to the list
when I could have just committed it... How wrong I was! (I only sent it
to the list because "git send-email -1" was the easiest way to get the
patch from work to my home computer.)
--
Tanu
More information about the pulseaudio-discuss
mailing list