Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ic apply some (uintptr_t) between pointer and int ca...
details: https://anonhg.NetBSD.org/src/rev/27bf6fe1698d
branches: trunk
changeset: 766753:27bf6fe1698d
user: mrg <mrg%NetBSD.org@localhost>
date: Fri Jul 01 08:38:10 2011 +0000
description:
apply some (uintptr_t) between pointer and int casting.
diffstat:
sys/dev/ic/dpt.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diffs (44 lines):
diff -r 636851ab7cda -r 27bf6fe1698d sys/dev/ic/dpt.c
--- a/sys/dev/ic/dpt.c Fri Jul 01 08:37:28 2011 +0000
+++ b/sys/dev/ic/dpt.c Fri Jul 01 08:38:10 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dpt.c,v 1.64 2010/11/13 13:52:01 uebayasi Exp $ */
+/* $NetBSD: dpt.c,v 1.65 2011/07/01 08:38:10 mrg Exp $ */
/*-
* Copyright (c) 1997, 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -71,7 +71,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dpt.c,v 1.64 2010/11/13 13:52:01 uebayasi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dpt.c,v 1.65 2011/07/01 08:38:10 mrg Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -535,7 +535,7 @@
*/
dpt_outb(sc, HA_COMMAND, CP_PIO_GETCFG);
memset(ec, 0, sizeof(*ec));
- i = ((int)&((struct eata_cfg *)0)->ec_cfglen +
+ i = ((int)(uintptr_t)&((struct eata_cfg *)0)->ec_cfglen +
sizeof(ec->ec_cfglen)) >> 1;
p = (u_int16_t *)ec;
@@ -550,13 +550,13 @@
*p++ = bus_space_read_stream_2(sc->sc_iot, sc->sc_ioh, HA_DATA);
if ((i = ec->ec_cfglen) > (sizeof(struct eata_cfg)
- - (int)(&(((struct eata_cfg *)0L)->ec_cfglen))
+ - (int)(uintptr_t)(&(((struct eata_cfg *)0L)->ec_cfglen))
- sizeof(ec->ec_cfglen)))
i = sizeof(struct eata_cfg)
- - (int)(&(((struct eata_cfg *)0L)->ec_cfglen))
+ - (int)(uintptr_t)(&(((struct eata_cfg *)0L)->ec_cfglen))
- sizeof(ec->ec_cfglen);
- j = i + (int)(&(((struct eata_cfg *)0L)->ec_cfglen)) +
+ j = i + (int)(uintptr_t)(&(((struct eata_cfg *)0L)->ec_cfglen)) +
sizeof(ec->ec_cfglen);
i >>= 1;
Home |
Main Index |
Thread Index |
Old Index