diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2015-02-23 03:34:06 -0300 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2015-02-23 03:34:06 -0300 |
commit | 50000d808e23a80b8e3ec26b46062c419edff6d4 (patch) | |
tree | c87415cdc2a4f904fc90f30b7f4822a068addfb6 /linux/Battery.c | |
parent | 5ca9b8e00266a4a3513143b91b87a616caee8f1c (diff) |
Silence warnings reported in #70.
Diffstat (limited to 'linux/Battery.c')
-rw-r--r-- | linux/Battery.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/linux/Battery.c b/linux/Battery.c index f766098f..532c118b 100644 --- a/linux/Battery.c +++ b/linux/Battery.c @@ -117,7 +117,8 @@ static ACPresence procAcpiCheck() { } char line[100]; - fgets(line, sizeof line, file); + char* ok = fgets(line, sizeof line, file); + if (!ok) continue; line[sizeof(line) - 1] = '\0'; fclose(file); |