[PATCH] bluetooth: Fix uninitialized variable.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux