From e2c25a3988065d3ccef12b25f5246826dea48b39 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 28 Oct 2024 09:52:39 +1000 Subject: [PATCH] Change fallback return value for libwacom_get_button_led_group to an int The implementation looked like this returns an enum value but it doesn't, the returned value is the numerical index of the LED group (typically 0 and 1 for Ring/Ring2 but also 0 and 1 for Strip/Strip2 since we don't have devices with combined features). Let's change the fallback to -1 too instead of the enum - same value but it makes the code more obvious. --- libwacom/libwacom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libwacom/libwacom.c b/libwacom/libwacom.c index 84d824fb..5ebff63f 100644 --- a/libwacom/libwacom.c +++ b/libwacom/libwacom.c @@ -1515,7 +1515,7 @@ libwacom_get_button_led_group (const WacomDevice *device, char button) } } - return WACOM_STATUS_LED_UNAVAILABLE; + return -1; } LIBWACOM_EXPORT int