tools: move variable declaration up
We do C99, but not this :)
@@ -1593,6 +1593,7 @@ ratbag_cmd_led_set_mode(const struct ratbag_cmd *cmd,
{
struct ratbag_led *led;
struct ratbag_color color;
+ enum ratbag_led_mode mode;
char *str;
int rc;
@@ -1602,8 +1603,6 @@ ratbag_cmd_led_set_mode(const struct ratbag_cmd *cmd,
led = options->led;
str = argv[0];
- enum ratbag_led_mode mode;
-
if (streq(str, "off"))
mode = RATBAG_LED_OFF;
else if (streq(str, "on"))
