summaryrefslogtreecommitdiff
path: root/bin/ps
diff options
context:
space:
mode:
authorOtto Moerbeek <otto@cvs.openbsd.org>2005-01-07 20:41:14 +0000
committerOtto Moerbeek <otto@cvs.openbsd.org>2005-01-07 20:41:14 +0000
commite4f4f347978b36c2a869622f384afba9e29fccac (patch)
treebfb7cf0a6d56e2f46e0028a7380cfc985f11ffa2 /bin/ps
parent0b40a4ff58c85ed64a182d360161ba4c3fa37b7c (diff)
avoid negative memory sizes, ok deraadt@
Diffstat (limited to 'bin/ps')
-rw-r--r--bin/ps/extern.h5
-rw-r--r--bin/ps/nlist.c6
2 files changed, 6 insertions, 5 deletions
diff --git a/bin/ps/extern.h b/bin/ps/extern.h
index e4f622b4dda..ac625fb62af 100644
--- a/bin/ps/extern.h
+++ b/bin/ps/extern.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: extern.h,v 1.11 2004/09/14 23:45:14 deraadt Exp $ */
+/* $OpenBSD: extern.h,v 1.12 2005/01/07 20:41:13 otto Exp $ */
/* $NetBSD: extern.h,v 1.10 1995/05/21 13:38:27 mycroft Exp $ */
/*-
@@ -37,7 +37,8 @@ struct var;
struct varent;
extern fixpt_t ccpu;
-extern int eval, fscale, mempages, nlistread, rawcpu, maxslp;
+extern int eval, fscale, nlistread, rawcpu, maxslp;
+extern u_int mempages;
extern int sumrusage, termwidth, totwidth;
extern VAR var[];
extern VARENT *vhead;
diff --git a/bin/ps/nlist.c b/bin/ps/nlist.c
index 342bd4b046b..dbd2634211e 100644
--- a/bin/ps/nlist.c
+++ b/bin/ps/nlist.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nlist.c,v 1.14 2003/06/11 23:42:12 deraadt Exp $ */
+/* $OpenBSD: nlist.c,v 1.15 2005/01/07 20:41:13 otto Exp $ */
/* $NetBSD: nlist.c,v 1.11 1995/03/21 09:08:03 cgd Exp $ */
/*-
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)nlist.c 8.4 (Berkeley) 4/2/94";
#else
-static char rcsid[] = "$OpenBSD: nlist.c,v 1.14 2003/06/11 23:42:12 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: nlist.c,v 1.15 2005/01/07 20:41:13 otto Exp $";
#endif
#endif /* not lint */
@@ -68,7 +68,7 @@ struct nlist psnl[] = {
fixpt_t ccpu; /* kernel _ccpu variable */
int nlistread; /* if nlist already read. */
-int mempages; /* number of pages of phys. memory */
+u_int mempages; /* number of pages of phys. memory */
int fscale; /* kernel _fscale variable */
int maxslp;