[alsa-devel] [PATCH v2] ALSA: seq: initialize whole fields of automatic variable with union type
Takashi Iwai
tiwai at suse.de
Wed Aug 31 14:09:28 CEST 2016
On Wed, 31 Aug 2016 14:02:13 +0200,
Takashi Sakamoto wrote:
>
> Currently, automatic variable of 'union ioctl_arg' type is initialized
> by designated initialization. Although, the actual effect is interpretation
> of early element of int type and initialization of 'int pversion'.
> Therefore the first field corresponding to int type is initialized to zero.
> This is against my expectation to initialize whole fields.
>
> This commit uses memset() to initialize the variable, instead of designated
> initialization.
>
> Fixes: 04a56dd8ed0d ('ALSA: seq: change ioctl command operation to get data in kernel space')
> Signed-off-by: Takashi Sakamoto <o-takashi at sakamocchi.jp>
Applied, thanks.
Takashi
More information about the Alsa-devel
mailing list