diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-07-01 14:53:06 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-07-01 14:53:06 +0000 |
commit | dc7a5eae36d31f5cfc301de2499329b8a03ea660 (patch) | |
tree | 6ce8b83805a7ce7aee1a42cd66ac4d4358fad329 /procps | |
parent | 16b7cb455d92710f09d476df747e2060318ad123 (diff) |
ps: fix "unused variable" warning; fix integer variable declared as char.
Diffstat (limited to 'procps')
-rw-r--r-- | procps/ps.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/procps/ps.c b/procps/ps.c index c6bffc60d..bbd546761 100644 --- a/procps/ps.c +++ b/procps/ps.c @@ -340,8 +340,9 @@ int ps_main(int argc, char **argv); int ps_main(int argc, char **argv) { procps_status_t *p = NULL; - int i, len; + int len; SKIP_SELINUX(const) int use_selinux = 0; + USE_SELINUX(int i;) #if !ENABLE_FEATURE_PS_WIDE enum { terminal_width = 79 }; #else @@ -367,7 +368,7 @@ int ps_main(int argc, char **argv) i = getopt32(argc, argv, "Z"); #endif #if ENABLE_SELINUX - if ((i & 1) && is_selinux_enabled()) + if (i && is_selinux_enabled()) use_selinux = PSSCAN_CONTEXT; #endif #endif /* ENABLE_FEATURE_PS_WIDE || ENABLE_SELINUX */ @@ -404,7 +405,7 @@ int ps_main(int argc, char **argv) } { - char sz = terminal_width - len; + int sz = terminal_width - len; char buf[sz + 1]; read_cmdline(buf, sz, p->pid, p->comm); puts(buf); |