Re: [patch] oxygen: clean up. make precedence explicit

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

 



> This doesn't change anything, but I think it makes the code clearer.
> It silences a smatch warning:
> sound/pci/oxygen/oxygen_mixer.c +91 dac_mute_put(7) warn: add some parenthesis here?

That message doesn't say why some parentheses should be added.
And it's a question; how do I give it the answer "no"?  :-)

> -	changed = !value->value.integer.value[0] != chip->dac_mute;
> +	changed = (!value->value.integer.value[0]) != chip->dac_mute;

This doesn't look any clearer to me; I don't think that the unary
negation operator could be thought to have lower precedence than "!=".

Why does smatch warn about this combination?  Do such errors actually
happen?


Regards,
Clemens
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux