From ddb797776aee737912b29fef51ce93599cff59cd Mon Sep 17 00:00:00 2001 From: bde Date: Tue, 14 Jul 1998 11:34:22 +0000 Subject: If object pointers need to be cast to [unsigned] integers, then cast to [u]intptr_t instead of to [u_]long. Don't cast pointers to integers just to do ordinary pointer arithmetic on them, especially when the casts use gcc's feature of casting lvalues. --- sys/scsi/sd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sys') diff --git a/sys/scsi/sd.c b/sys/scsi/sd.c index f9e7b68..4a35005 100644 --- a/sys/scsi/sd.c +++ b/sys/scsi/sd.c @@ -14,7 +14,7 @@ * * Ported to run under 386BSD by Julian Elischer (julian@dialix.oz.au) Sept 1992 * - * $Id: sd.c,v 1.133 1998/07/11 07:45:59 bde Exp $ + * $Id: sd.c,v 1.134 1998/07/13 08:23:05 julian Exp $ */ #include "opt_bounce.h" @@ -1264,7 +1264,7 @@ sdsdump(void *private, int32_t start, int32_t num) * If we are dumping core, it may take a while. * So reassure the user and hold off any watchdogs. */ - if ((u_long)addr % (1024 * 1024) == 0) { + if ((uintptr_t)addr % (1024 * 1024) == 0) { #ifdef HW_WDOG if (wdog_tickler) (*wdog_tickler)(); @@ -1274,7 +1274,7 @@ sdsdump(void *private, int32_t start, int32_t num) /* update block count */ num -= blkcnt; blknum += blkcnt; - (long) addr += blkcnt * sd->params.secsiz; + addr += blkcnt * sd->params.secsiz; /* operator aborting dump? */ if (cncheckc() != -1) -- cgit v1.1