From f253bbebd2fffbc221732f9a3e95c48e7b1d8779 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Tue, 18 Dec 2018 20:22:48 +0100 Subject: [PATCH] module/battery: we're scanning into a signed long --- modules/battery/battery.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/battery/battery.c b/modules/battery/battery.c index 27db267..c374708 100644 --- a/modules/battery/battery.c +++ b/modules/battery/battery.c @@ -120,7 +120,7 @@ readint_from_fd(int fd) assert(s != NULL); long ret; - int r = sscanf(s, "%lu", &ret); + int r = sscanf(s, "%ld", &ret); assert(r == 1); return ret;