aboutsummaryrefslogtreecommitdiff
path: root/procps
diff options
context:
space:
mode:
Diffstat (limited to 'procps')
-rw-r--r--procps/sysctl.c8
-rw-r--r--procps/uptime.c2
2 files changed, 6 insertions, 4 deletions
diff --git a/procps/sysctl.c b/procps/sysctl.c
index 7c72ac933..2c3fda5fe 100644
--- a/procps/sysctl.c
+++ b/procps/sysctl.c
@@ -301,14 +301,16 @@ int sysctl_display_all(const char *path, int output, int show_table)
char *tmpdir;
struct stat ts;
- if (!(dp = opendir(path))) {
+ dp = opendir(path);
+ if (!dp) {
retval = -1;
} else {
while ((de = readdir(dp)) != NULL) {
tmpdir = concat_subpath_file(path, de->d_name);
- if(tmpdir == NULL)
+ if (tmpdir == NULL)
continue;
- if ((retval2 = stat(tmpdir, &ts)) != 0)
+ retval2 = stat(tmpdir, &ts);
+ if (retval2 != 0)
bb_perror_msg(tmpdir);
else {
if (S_ISDIR(ts.st_mode)) {
diff --git a/procps/uptime.c b/procps/uptime.c
index 3573ffe73..c2b5d3966 100644
--- a/procps/uptime.c
+++ b/procps/uptime.c
@@ -46,7 +46,7 @@ int uptime_main(int argc, char **argv)
upminutes = (int) info.uptime / 60;
uphours = (upminutes / 60) % 24;
upminutes %= 60;
- if(uphours)
+ if (uphours)
printf("%2d:%02d, ", uphours, upminutes);
else
printf("%d min, ", upminutes);