Reset the button action struct to zero before use

A semi false-positive from Coverity, because action.macro is unset. Doesn't
matter because we never use it, but having it zeroed is the nice thing to do
(and what we do in the other functions).

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer
2017-04-27 11:24:01 +10:00
committed by bentiss
parent 11b31cf9bd
commit 28dd84713f

View File

@@ -1292,7 +1292,7 @@ ratbag_button_set_key(struct ratbag_button *button,
LIBRATBAG_EXPORT enum ratbag_error_code
ratbag_button_disable(struct ratbag_button *button)
{
struct ratbag_button_action action;
struct ratbag_button_action action = {0};
if (!ratbag_device_has_capability(button->profile->device,
RATBAG_DEVICE_CAP_BUTTON_KEY))