summaryrefslogtreecommitdiff
path: root/procps/sysctl.c
diff options
context:
space:
mode:
authorDenis Vlasenko2007-04-12 00:32:05 +0000
committerDenis Vlasenko2007-04-12 00:32:05 +0000
commit51742f4bb0c57a4d5063ece9437a2f34a42e52c8 (patch)
tree7a912fc65ff43bdb09078d75bfc02ad8f5380b47 /procps/sysctl.c
parent50f7f446ecaadef6895a4ee601567e0b68330637 (diff)
downloadbusybox-51742f4bb0c57a4d5063ece9437a2f34a42e52c8.zip
busybox-51742f4bb0c57a4d5063ece9437a2f34a42e52c8.tar.gz
style fixes. No code changes
Diffstat (limited to 'procps/sysctl.c')
-rw-r--r--procps/sysctl.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/procps/sysctl.c b/procps/sysctl.c
index 7c72ac9..2c3fda5 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)) {