Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/cobalt/stand/boot avoid pointer aliasing issues
details: https://anonhg.NetBSD.org/src/rev/98433aa32716
branches: trunk
changeset: 767022:98433aa32716
user: mrg <mrg%NetBSD.org@localhost>
date: Thu Jul 07 06:01:51 2011 +0000
description:
avoid pointer aliasing issues
diffstat:
sys/arch/cobalt/stand/boot/wd.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diffs (23 lines):
diff -r c0c6c9314a23 -r 98433aa32716 sys/arch/cobalt/stand/boot/wd.c
--- a/sys/arch/cobalt/stand/boot/wd.c Thu Jul 07 06:01:30 2011 +0000
+++ b/sys/arch/cobalt/stand/boot/wd.c Thu Jul 07 06:01:51 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wd.c,v 1.13 2010/07/11 17:09:27 he Exp $ */
+/* $NetBSD: wd.c,v 1.14 2011/07/07 06:01:51 mrg Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -55,11 +55,12 @@
{
int error;
uint8_t buf[DEV_BSIZE];
+ struct ataparams *params = (struct ataparams *)buf;
if ((error = wdc_exec_identify(wd, buf)) != 0)
return error;
- wd->sc_params = *(struct ataparams *)buf;
+ wd->sc_params = *params;
/* 48-bit LBA addressing */
if ((wd->sc_params.atap_cmd2_en & ATA_CMD2_LBA48) != 0)
Home |
Main Index |
Thread Index |
Old Index