ratbagd: fix use of potentially unused variable

Simply abort if the macro value is bad, that's a libratbag bug and should
never happen.

Found in #312

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer
2017-08-31 08:18:42 +10:00
committed by Benjamin Tissoires
parent c868c43179
commit 6cdf8a901a

View File

@@ -305,6 +305,8 @@ static int ratbagd_button_get_macro(sd_bus *bus,
case RATBAG_MACRO_EVENT_WAIT:
value = ratbag_button_macro_get_event_timeout(macro, idx);
break;
default:
abort();
}
r = sd_bus_message_append(reply, "(uu)", type, value);