]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: seq: initialize whole fields of automatic variable with union type
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Wed, 31 Aug 2016 12:02:13 +0000 (21:02 +0900)
committerTakashi Iwai <tiwai@suse.de>
Wed, 31 Aug 2016 12:09:05 +0000 (14:09 +0200)
commit1c74b0bd18019e1098087a2c7c754ff5aa92b9ce
treef78a394e9885467737ff2ee0afc4dbd6d8c1cdf8
parenta0f0742688d9c7cebeb181e90fc4d0fb3086bf6b
ALSA: seq: initialize whole fields of automatic variable with union type

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: 77ed9da1cf9f ('ALSA: seq: change ioctl command operation to get data in kernel space')
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/seq/seq_clientmgr.c