Skip to content

Commit

Permalink
Change fallback return value for libwacom_get_button_led_group to an int
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
whot committed Nov 4, 2024
1 parent 5b900d9 commit dce3c18
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libwacom/libwacom.c
Original file line number Diff line number Diff line change
Expand Up @@ -1528,7 +1528,7 @@ libwacom_get_button_led_group (const WacomDevice *device, char button)
}
}

return WACOM_STATUS_LED_UNAVAILABLE;
return -1;
}

LIBWACOM_EXPORT int
Expand Down

0 comments on commit dce3c18

Please sign in to comment.