From 478f2f693eb93fc0c9ff1ad56ba24ad77c4bb9fa Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Mon, 30 Mar 2009 14:06:41 +0100 Subject: trivial: fix a logic thinko with sysfs_get_bool() --- src/sysfs-utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/sysfs-utils.c') 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); } -- cgit v1.2.1