summaryrefslogtreecommitdiff
path: root/src/sysfs-utils.c
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2009-03-30 14:06:41 +0100
committerRichard Hughes <richard@hughsie.com>2009-03-30 14:06:41 +0100
commit478f2f693eb93fc0c9ff1ad56ba24ad77c4bb9fa (patch)
treec531a0512ff70ae7f306bca2add4f7ec12fd0a07 /src/sysfs-utils.c
parentc41303557ef0313a0aaf2caa9f0d7cfd9d5797b1 (diff)
downloadupower-478f2f693eb93fc0c9ff1ad56ba24ad77c4bb9fa.tar.gz
trivial: fix a logic thinko with sysfs_get_bool()
Diffstat (limited to 'src/sysfs-utils.c')
-rw-r--r--src/sysfs-utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sysfs-utils.c b/src/sysfs-utils.c
index 4784439..b88fa29 100644
--- a/src/sysfs-utils.c
+++ b/src/sysfs-utils.c
@@ -141,7 +141,7 @@ sysfs_get_bool (const char *dir, const char *attribute)
result = 0;
filename = g_build_filename (dir, attribute, NULL);
if (g_file_get_contents (filename, &contents, NULL, NULL)) {
- if (strcmp (contents, "1"))
+ if (strcmp (contents, "1") == 0)
result = TRUE;
g_free (contents);
}