From 0a98818376276f1f2d12b5650effef6b16177b82 Mon Sep 17 00:00:00 2001 From: Richard Sailer Date: Sun, 4 Aug 2019 04:33:00 +0200 Subject: [PATCH] set_color_region(): more meaningfull variable names --- src/tuxedo_keyboard.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/tuxedo_keyboard.c b/src/tuxedo_keyboard.c index 13f9812..c88e267 100644 --- a/src/tuxedo_keyboard.c +++ b/src/tuxedo_keyboard.c @@ -341,28 +341,28 @@ static int set_color(u32 region, u32 color) return tuxedo_evaluate_wmi_method(SET_KB_LED, cmd, NULL); } -static int set_color_region(const char *buffer, size_t size, u32 region) +static int set_color_region(const char *color_string, size_t size, u32 region) { - u32 val; - int err = kstrtouint(buffer, 0, &val); + u32 colorcode; + int err = kstrtouint(color_string, 0, &colorcode); if (err) { return err; } - if (!set_color(region, val)) { + if (!set_color(region, colorcode)) { switch (region) { case REGION_LEFT: - keyboard.color.left = val; + keyboard.color.left = colorcode; break; case REGION_CENTER: - keyboard.color.center = val; + keyboard.color.center = colorcode; break; case REGION_RIGHT: - keyboard.color.right = val; + keyboard.color.right = colorcode; break; case REGION_EXTRA: - keyboard.color.extra = val; + keyboard.color.extra = colorcode; break; } }