Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/vax/boot/boot avoid some multi-level pointer cast i...
details: https://anonhg.NetBSD.org/src/rev/ae1fc3c647cc
branches: trunk
changeset: 766850:ae1fc3c647cc
user: mrg <mrg%NetBSD.org@localhost>
date: Sun Jul 03 08:56:25 2011 +0000
description:
avoid some multi-level pointer cast issues.
diffstat:
sys/arch/vax/boot/boot/if_ni.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diffs (37 lines):
diff -r cc5f158141e9 -r ae1fc3c647cc sys/arch/vax/boot/boot/if_ni.c
--- a/sys/arch/vax/boot/boot/if_ni.c Sun Jul 03 08:53:23 2011 +0000
+++ b/sys/arch/vax/boot/boot/if_ni.c Sun Jul 03 08:56:25 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ni.c,v 1.8 2009/10/26 19:16:58 cegger Exp $ */
+/* $NetBSD: if_ni.c,v 1.9 2011/07/03 08:56:25 mrg Exp $ */
/*
* Copyright (c) 2000 Ludd, University of Lule}, Sweden.
* All rights reserved.
@@ -194,6 +194,7 @@
struct ni_msg *msg;
struct ni_ptdb *ptdb;
int i, va, res;
+ struct ni_param *nip;
if (beenhere++ && askname == 0)
return 0;
@@ -368,7 +369,8 @@
msg->nm_status = 0;
msg->nm_len = sizeof(struct ni_param) + 6;
msg->nm_opcode2 = NI_WPARAM;
- ((struct ni_param *)&msg->nm_text[0])->np_flags = NP_PAD;
+ nip = (struct ni_param *)&msg->nm_text[0];
+ nip->np_flags = NP_PAD;
puton(msg, &gvp->nc_forw0, PCR_CMDQNE|PCR_CMDQ0|PCR_OWN);
@@ -383,8 +385,7 @@
insput(data, &fqb->nf_mforw, PCR_FREEQNE|PCR_MFREEQ|PCR_OWN);
}
#endif
- bcopy(((struct ni_param *)&msg->nm_text[0])->np_dpa,
- enaddr, ETHER_ADDR_LEN);
+ bcopy(nip->np_dpa, enaddr, ETHER_ADDR_LEN);
insput(data, &fqb->nf_mforw, PCR_FREEQNE|PCR_MFREEQ|PCR_OWN);
#ifdef NIDEBUG
Home |
Main Index |
Thread Index |
Old Index