diff options
author | Rob Landley <rob@landley.net> | 2014-11-22 00:31:03 -0600 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2014-11-22 00:31:03 -0600 |
commit | ea6fc27fc8853b317a78c402e290bdc0142792e8 (patch) | |
tree | 7db41a0c8b0b525ab526fd62e556aa13a91a5dcb /toys/other | |
parent | 6a29bb1ebe62ada2dad5fb50f84f23a497cd677a (diff) | |
download | toybox-ea6fc27fc8853b317a78c402e290bdc0142792e8.tar.gz |
Whitespace/code style.
Diffstat (limited to 'toys/other')
-rw-r--r-- | toys/other/acpi.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/toys/other/acpi.c b/toys/other/acpi.c index c293e84c..c4f31283 100644 --- a/toys/other/acpi.c +++ b/toys/other/acpi.c @@ -111,10 +111,11 @@ int temp_callback(struct dirtree *tree) int cool_callback(struct dirtree *tree) { int dfd=5, cur, max; + errno = 0; memset(toybuf, 0, sizeof(toybuf)); - if (tree->name[0]=='.') return 0; + if (*tree->name == '.') return 0; if (!tree->parent) return DIRTREE_RECURSE|DIRTREE_SYMFOLLOW; @@ -136,14 +137,11 @@ int cool_callback(struct dirtree *tree) void acpi_main(void) { - if (toys.optflags & FLAG_V) - toys.optflags = FLAG_a|FLAG_b|FLAG_c|FLAG_t; + if (toys.optflags & FLAG_V) toys.optflags = FLAG_a|FLAG_b|FLAG_c|FLAG_t; if (!toys.optflags) toys.optflags = FLAG_b; if (toys.optflags & (FLAG_a|FLAG_b)) dirtree_read("/sys/class/power_supply", acpi_callback); - if (toys.optflags & FLAG_t) - dirtree_read("/sys/class", temp_callback); - if (toys.optflags & FLAG_c) - dirtree_read("/sys/class/thermal", cool_callback); + if (toys.optflags & FLAG_t) dirtree_read("/sys/class", temp_callback); + if (toys.optflags & FLAG_c) dirtree_read("/sys/class/thermal", cool_callback); } |