module/battery: we're scanning into a signed long

This commit is contained in:
Daniel Eklöf 2018-12-18 20:22:48 +01:00
parent 76995ddcd5
commit f253bbebd2

View file

@ -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;