Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pcmcia if we can memcpy to body->macaddr, we can mem...



details:   https://anonhg.NetBSD.org/src/rev/c19e45c6342e
branches:  trunk
changeset: 1004060:c19e45c6342e
user:      bad <bad%NetBSD.org@localhost>
date:      Thu Oct 10 23:37:13 2019 +0000

description:
if we can memcpy to body->macaddr, we can memcpy from it.

diffstat:

 sys/dev/pcmcia/if_malo_pcmcia.c |  7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diffs (28 lines):

diff -r 34d99fd97698 -r c19e45c6342e sys/dev/pcmcia/if_malo_pcmcia.c
--- a/sys/dev/pcmcia/if_malo_pcmcia.c   Thu Oct 10 23:30:02 2019 +0000
+++ b/sys/dev/pcmcia/if_malo_pcmcia.c   Thu Oct 10 23:37:13 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_malo_pcmcia.c,v 1.21 2019/03/05 08:25:02 msaitoh Exp $      */
+/*     $NetBSD: if_malo_pcmcia.c,v 1.22 2019/10/10 23:37:13 bad Exp $  */
 /*      $OpenBSD: if_malo.c,v 1.65 2009/03/29 21:53:53 sthen Exp $ */
 
 /*
@@ -18,7 +18,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_malo_pcmcia.c,v 1.21 2019/03/05 08:25:02 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_malo_pcmcia.c,v 1.22 2019/10/10 23:37:13 bad Exp $");
 
 #ifdef _MODULE
 #include <sys/module.h>
@@ -1313,8 +1313,7 @@
        body = (struct malo_cmd_body_spec *)(hdr + 1);
 
        /* get our MAC address */
-       for (i = 0; i < ETHER_ADDR_LEN; i++)
-               ic->ic_myaddr[i] = body->macaddr[i];
+       memcpy(ic->ic_myaddr, body->macaddr, ETHER_ADDR_LEN);
 
        return 0;
 }



Home | Main Index | Thread Index | Old Index