From 28dd84713fc1e3b57b532414c4f046c8a6796feb Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 27 Apr 2017 11:24:01 +1000 Subject: [PATCH] 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 --- src/libratbag.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libratbag.c b/src/libratbag.c index fc9cdc9e..76d65e65 100644 --- a/src/libratbag.c +++ b/src/libratbag.c @@ -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))