Constify.

This commit is contained in:
dyoung 2007-08-26 22:36:35 +00:00
parent e6fc91327f
commit f004b71d98
5 changed files with 16 additions and 16 deletions

View File

@ -35,7 +35,7 @@
__FBSDID("$FreeBSD: src/sys/compat/ndis/subr_ndis.c,v 1.67.2.7 2005/03/31 21:50:11 wpaul Exp $");
#endif
#ifdef __NetBSD__
__KERNEL_RCSID(0, "$NetBSD: subr_ndis.c,v 1.8 2007/03/05 21:05:02 dogcow Exp $");
__KERNEL_RCSID(0, "$NetBSD: subr_ndis.c,v 1.9 2007/08/26 22:36:35 dyoung Exp $");
#endif
/*
@ -1665,7 +1665,7 @@ NdisReadNetworkAddress(status, addr, addrlen, adapter)
#ifdef __FreeBSD__
if (bcmp(sc->arpcom.ac_enaddr, empty, ETHER_ADDR_LEN) == 0)
#else
if (bcmp(LLADDR(sc->arpcom.ec_if.if_sadl),
if (bcmp(CLLADDR(sc->arpcom.ec_if.if_sadl),
empty, ETHER_ADDR_LEN) == 0)
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: iopl.c,v 1.26 2007/07/09 21:00:33 ad Exp $ */
/* $NetBSD: iopl.c,v 1.27 2007/08/26 22:36:35 dyoung Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@ -46,7 +46,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: iopl.c,v 1.26 2007/07/09 21:00:33 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: iopl.c,v 1.27 2007/08/26 22:36:35 dyoung Exp $");
#include "opt_inet.h"
#include "bpfilter.h"
@ -1457,7 +1457,7 @@ iopl_init(struct ifnet *ifp)
* Try to set the active MAC address.
*/
memset(hwaddr, 0, sizeof(hwaddr));
memcpy(hwaddr, LLADDR(ifp->if_sadl), ifp->if_addrlen);
memcpy(hwaddr, CLLADDR(ifp->if_sadl), ifp->if_addrlen);
iop_field_set(iop, sc->sc_tid, I2O_PARAM_LAN_MAC_ADDRESS,
hwaddr, sizeof(hwaddr), I2O_PARAM_LAN_MAC_ADDRESS_localaddr);
@ -1930,7 +1930,7 @@ iopl_ioctl(struct ifnet *ifp, u_long cmd, void *data)
case SIOCGIFADDR:
ifr = (struct ifreq *)data;
memcpy(((struct sockaddr *)&ifr->ifr_data)->sa_data,
LLADDR(ifp->if_sadl), 6);
CLLADDR(ifp->if_sadl), 6);
break;
case SIOCSIFFLAGS:

View File

@ -1,4 +1,4 @@
/* $NetBSD: aic6915.c,v 1.17 2007/07/09 21:00:34 ad Exp $ */
/* $NetBSD: aic6915.c,v 1.18 2007/08/26 22:36:35 dyoung Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: aic6915.c,v 1.17 2007/07/09 21:00:34 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: aic6915.c,v 1.18 2007/08/26 22:36:35 dyoung Exp $");
#include "bpfilter.h"
@ -1252,7 +1252,7 @@ sf_add_rxbuf(struct sf_softc *sc, int idx)
}
static void
sf_set_filter_perfect(struct sf_softc *sc, int slot, uint8_t *enaddr)
sf_set_filter_perfect(struct sf_softc *sc, int slot, const uint8_t *enaddr)
{
uint32_t reg0, reg1, reg2;
@ -1325,7 +1325,7 @@ sf_set_filter(struct sf_softc *sc)
* First, write the station address to the perfect filter
* table.
*/
sf_set_filter_perfect(sc, 0, LLADDR(ifp->if_sadl));
sf_set_filter_perfect(sc, 0, CLLADDR(ifp->if_sadl));
/*
* Now set the hash bits for each multicast address in our

View File

@ -1,4 +1,4 @@
/* $NetBSD: am7990.c,v 1.68 2005/12/11 12:21:25 christos Exp $ */
/* $NetBSD: am7990.c,v 1.69 2007/08/26 22:36:35 dyoung Exp $ */
/*-
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@ -72,7 +72,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: am7990.c,v 1.68 2005/12/11 12:21:25 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: am7990.c,v 1.69 2007/08/26 22:36:35 dyoung Exp $");
#include "bpfilter.h"
#include "rnd.h"
@ -172,7 +172,7 @@ am7990_meminit(struct lance_softc *sc)
* Update our private copy of the Ethernet address.
* We NEED the copy so we can ensure its alignment!
*/
memcpy(sc->sc_enaddr, LLADDR(ifp->if_sadl), ETHER_ADDR_LEN);
memcpy(sc->sc_enaddr, CLLADDR(ifp->if_sadl), ETHER_ADDR_LEN);
myaddr = sc->sc_enaddr;
init.init_padr[0] = (myaddr[1] << 8) | myaddr[0];

View File

@ -1,4 +1,4 @@
/* $NetBSD: am79900.c,v 1.17 2005/12/24 20:27:29 perry Exp $ */
/* $NetBSD: am79900.c,v 1.18 2007/08/26 22:36:36 dyoung Exp $ */
/*-
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@ -110,7 +110,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: am79900.c,v 1.17 2005/12/24 20:27:29 perry Exp $");
__KERNEL_RCSID(0, "$NetBSD: am79900.c,v 1.18 2007/08/26 22:36:36 dyoung Exp $");
#include "bpfilter.h"
#include "rnd.h"
@ -212,7 +212,7 @@ am79900_meminit(struct lance_softc *sc)
* Update our private copy of the Ethernet address.
* We NEED the copy so we can ensure its alignment!
*/
memcpy(sc->sc_enaddr, LLADDR(ifp->if_sadl), ETHER_ADDR_LEN);
memcpy(sc->sc_enaddr, CLLADDR(ifp->if_sadl), ETHER_ADDR_LEN);
myaddr = sc->sc_enaddr;
init.init_padr[0] = myaddr[0] | (myaddr[1] << 8)