[alsa-devel] [patch 1/2] ALSA: oxfw: some signedness bugs

Takashi Sakamoto o-takashi at sakamocchi.jp
Sat Dec 13 06:06:59 CET 2014


On Dec 13 2014 04:27, Dan Carpenter wrote:
> This code tends to use unsigned variables by default and it causes
> signedness bugs when we use negative variables for error handling.
> The "i" and "j" variables are used to iterated over small positive
> values and so they should be type "int".  The "len" variable doesn't
> *need* to be signed but it should be signed to make the code easier to
> read and audit.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter at oracle.com>

Thanks, but I prefer to use 'unsigned int' for loop counter, like the
other drivers. Would you give 'int' type just for err variables?


Regards

Takashi Sakamoto
o-takashi at sakamocchi.jp



More information about the Alsa-devel mailing list