svn commit: trunk/busybox/procps
vda at busybox.net
vda at busybox.net
Sun Jul 1 14:53:08 UTC 2007
Author: vda
Date: 2007-07-01 07:53:06 -0700 (Sun, 01 Jul 2007)
New Revision: 18981
Log:
ps: fix "unused variable" warning; fix integer variable declared as char.
Modified:
trunk/busybox/procps/ps.c
Changeset:
Modified: trunk/busybox/procps/ps.c
===================================================================
--- trunk/busybox/procps/ps.c 2007-06-30 17:12:14 UTC (rev 18980)
+++ trunk/busybox/procps/ps.c 2007-07-01 14:53:06 UTC (rev 18981)
@@ -340,8 +340,9 @@
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 @@
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 @@
}
{
- char sz = terminal_width - len;
+ int sz = terminal_width - len;
char buf[sz + 1];
read_cmdline(buf, sz, p->pid, p->comm);
puts(buf);
More information about the busybox-cvs
mailing list