From 45bff732e97b22ebdcaf20b98ceb0666b368d1c4 Mon Sep 17 00:00:00 2001 From: Aiden Gall Date: Mon, 11 Dec 2023 19:53:35 +0000 Subject: eliminate useless variable --- simplebl.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/simplebl.c b/simplebl.c index f4d81ea..2890bd2 100644 --- a/simplebl.c +++ b/simplebl.c @@ -167,7 +167,7 @@ write_sys_file_num(const char *const path, const long val) int main(int argc, char *argv[]) { - long brightness, max_brightness; + long max_brightness; long val; if (!check_group()) @@ -185,8 +185,7 @@ main(int argc, char *argv[]) val = -val; /* FALLTHROUGH */ case '+': - brightness = read_sys_file_num(BRIGHTNESS); - val += brightness; + val += read_sys_file_num(BRIGHTNESS); /* FALLTHROUGH */ case '=': max_brightness = read_sys_file_num(MAX_BRIGHTNESS); -- cgit v1.2.3