simplify KPTR processing.

This commit is contained in:
itojun 2001-01-08 17:18:24 +00:00
parent 6931d9c234
commit a3c77f0437

View File

@ -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 @@ printval(bp, v, mode)
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;