Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/bin/ps simplify KPTR processing.
details: https://anonhg.NetBSD.org/src/rev/5681e0b63d14
branches: trunk
changeset: 501865:5681e0b63d14
user: itojun <itojun%NetBSD.org@localhost>
date: Mon Jan 08 17:18:24 2001 +0000
description:
simplify KPTR processing.
diffstat:
bin/ps/print.c | 18 ++++--------------
1 files changed, 4 insertions(+), 14 deletions(-)
diffs (42 lines):
diff -r 3eb6a0eac7cf -r 5681e0b63d14 bin/ps/print.c
--- a/bin/ps/print.c Mon Jan 08 16:42:29 2001 +0000
+++ b/bin/ps/print.c Mon Jan 08 17:18:24 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: print.c,v 1.58 2001/01/08 13:20:30 itojun Exp $ */
+/* $NetBSD: print.c,v 1.59 2001/01/08 17:18:24 itojun Exp $ */
/*
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -74,7 +74,7 @@
#if 0
static char sccsid[] = "@(#)print.c 8.6 (Berkeley) 4/16/94";
#else
-__RCSID("$NetBSD: print.c,v 1.58 2001/01/08 13:20:30 itojun Exp $");
+__RCSID("$NetBSD: print.c,v 1.59 2001/01/08 17:18:24 itojun Exp $");
#endif
#endif /* not lint */
@@ -930,21 +930,11 @@
vok = VUNSIGN;
break;
case KPTR:
- if (sizeof(void *) == sizeof(u_int32_t))
- uval = GET(u_int32_t);
- else if (sizeof(void *) == sizeof(u_int64_t))
- uval = GET(u_int64_t);
- else
- errx(1, "assumption failed");
+ uval = (unsigned long long)GET(void *);
vok = VPTR;
break;
case KPTR24:
- if (sizeof(void *) == sizeof(u_int32_t))
- uval = GET(u_int32_t);
- else if (sizeof(void *) == sizeof(u_int64_t))
- uval = GET(u_int64_t);
- else
- errx(1, "assumption failed");
+ uval = (unsigned long long)GET(void *);
uval &= 0xffffff;
vok = VPTR;
break;
Home |
Main Index |
Thread Index |
Old Index