summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAiden Gall <aiden@aidengall.xyz>2023-12-11 19:53:35 +0000
committerAiden Gall <aiden@aidengall.xyz>2023-12-11 19:53:35 +0000
commit45bff732e97b22ebdcaf20b98ceb0666b368d1c4 (patch)
treed1dcc9cc02c86273ad3afafe742ad8d5e6e52d07
parent90da4e5dc8be70f3a5c51598d1fbbb6efd6972f6 (diff)
eliminate useless variable
-rw-r--r--simplebl.c5
1 files 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);