aboutsummaryrefslogtreecommitdiff
path: root/brightnessctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'brightnessctl.c')
-rw-r--r--brightnessctl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/brightnessctl.c b/brightnessctl.c
index 3f7cfc1..1eee6c6 100644
--- a/brightnessctl.c
+++ b/brightnessctl.c
@@ -405,7 +405,7 @@ int save_device_data(struct device *dev) {
goto fail;
if (!(fp = fopen(d_path, "w")))
goto fail;
- if (fwrite(c, 1, s + 1, fp) < s + 1)
+ if (fwrite(c, 1, s, fp) < s)
errno = -1;
fclose(fp);
fail: