Hi.

I was reading through some code, and a came across what looks like an unnecessary if 
statement. 

In alsa-lib/src/pcm/pcm_params.c. The 7th line in the _snd_pcm_hw_param_set_min 
function reads: 

if(val > 0)

A quick look at val's definition, in the function header, reveals that it's an 
unsigned int. That being the case, if(val > 0) is always true, unless val == 0. 

Looking further at the logic, 0 isn't an invalid input anywhere val is used in the 
function. So there's no need to check that.

It doesn't seem to be a big deal, but I thought I should mention it anyway...

Kyle C.
-- 

_______________________________________________
Sign-up for your own FREE Personalized E-mail at Mail.com
http://www.mail.com/?sr=signup

Win a ski trip!
http://www.nowcode.com/register.asp?affiliate=1net2phone3a



_______________________________________________
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

Reply via email to