summaryrefslogtreecommitdiffstats
path: root/bin/ps
diff options
context:
space:
mode:
Diffstat (limited to 'bin/ps')
-rw-r--r--bin/ps/print.c10
-rw-r--r--bin/ps/ps.c9
2 files changed, 10 insertions, 9 deletions
diff --git a/bin/ps/print.c b/bin/ps/print.c
index cbbe38a..ded44f5 100644
--- a/bin/ps/print.c
+++ b/bin/ps/print.c
@@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: print.c,v 1.4 1994/10/02 08:33:30 davidg Exp $
+ * $Id: print.c,v 1.5 1994/10/02 14:11:32 ache Exp $
*/
#ifndef lint
@@ -468,7 +468,7 @@ p_rssize(k, ve) /* doesn't account for text */
#ifndef NEWVM
(void)printf("%*d", v->width, pgtok(KI_PROC(k)->p_rssize));
#else
- (void)printf("%*d", v->width, pgtok(KI_EPROC(k)->e_vm.vm_rssize));
+ (void)printf("%*ld", v->width, pgtok(KI_EPROC(k)->e_vm.vm_rssize));
#endif
}
@@ -599,7 +599,7 @@ pagein(k, ve)
VAR *v;
v = ve->var;
- (void)printf("%*d", v->width,
+ (void)printf("%*ld", v->width,
k->ki_u.u_valid ? k->ki_u.u_ru.ru_majflt : 0);
}
@@ -630,7 +630,7 @@ tsize(k, ve)
#ifndef NEWVM
(void)printf("%*d", v->width, pgtok(KI_EPROC(k)->e_xsize));
#else
- (void)printf("%*d", v->width, pgtok(KI_EPROC(k)->e_vm.vm_tsize));
+ (void)printf("%*ld", v->width, pgtok(KI_EPROC(k)->e_vm.vm_tsize));
#endif
}
@@ -664,7 +664,7 @@ printval(bp, v)
if (v->flag & LJUST)
*cp++ = '-';
*cp++ = '*';
- while (*cp++ = *fcp++);
+ while ((*cp++ = *fcp++));
switch (v->type) {
case CHAR:
diff --git a/bin/ps/ps.c b/bin/ps/ps.c
index 85a03e4..831649b 100644
--- a/bin/ps/ps.c
+++ b/bin/ps/ps.c
@@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: ps.c,v 1.4 1994/10/02 08:33:31 davidg Exp $
+ * $Id: ps.c,v 1.5 1994/10/18 04:27:46 davidg Exp $
*/
#ifndef lint
@@ -384,7 +384,7 @@ saveuser(ki)
struct user *u_addr = (struct user *)USRSTACK;
usp = &ki->ki_u;
- if (kvm_uread(kd, KI_PROC(ki), &u_addr->u_stats,
+ if (kvm_uread(kd, KI_PROC(ki), (unsigned long)&u_addr->u_stats,
(char *)&pstats, sizeof(pstats)) == sizeof(pstats)) {
/*
* The u-area might be swapped out, and we can't get
@@ -486,8 +486,9 @@ kludge_oldps_options(s)
* if there's a trailing number, and not a preceding 'p' (pid) or
* 't' (tty) flag, then assume it's a pid and insert a 'p' flag.
*/
- if (isdigit(*cp) && (cp == s || cp[-1] != 't' && cp[-1] != 'p' &&
- (cp - 1 == s || cp[-2] != 't')))
+ if (isdigit(*cp) &&
+ (cp == s || (cp[-1] != 't' && cp[-1] != 'p')) &&
+ (cp - 1 == s || cp[-2] != 't'))
*ns++ = 'p';
(void)strcpy(ns, cp); /* and append the number */
OpenPOWER on IntegriCloud