summarylogtreecommitdiffstats
path: root/percent_float_to_int.patch
blob: ec9c5d6fe0d83f2a7b653da8e455a8d0d2972348 (plain)
1
2
3
4
5
6
7
8
9
10
11
--- xbacklight.c	2013-10-08 11:40:38.000000000 +0800
+++ xbacklight.c	2015-11-29 17:53:54.254565462 +0800
@@ -282,7 +282,7 @@
 		    max = values[1];
 
 		    if (op == Get) {
-			printf ("%f\n", (cur - min) * 100 / (max - min));
+			printf ("%.0f\n", (cur - min) * 100 / (max - min));
 		    } else {
 			set = value * (max - min) / 100;
 			switch (op) {