From 515e53b4faba2e164c900f389bc75b0384eb8ee9 Mon Sep 17 00:00:00 2001 From: Leandro Pereira Date: Thu, 7 Jan 2016 00:55:07 -0200 Subject: Avoid potential crash if there's leading whitespace --- modules/devices/battery.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/devices/battery.c') diff --git a/modules/devices/battery.c b/modules/devices/battery.c index 3bce2d42..cbcebb12 100644 --- a/modules/devices/battery.c +++ b/modules/devices/battery.c @@ -234,7 +234,7 @@ read_contents(const gchar *base, const gchar *key) } free(path); - return g_strstrip(value); + return g_strchomp(value); } static void -- cgit v1.2.3