diff options
| author | christos <christos@NetBSD.org> | 2010-05-19 20:41:59 +0000 |
|---|---|---|
| committer | christos <christos@NetBSD.org> | 2010-05-19 20:41:59 +0000 |
| commit | 5cbb2aa8811baa2b1f158ccb6bc8e7b01beb5e45 (patch) | |
| tree | b0373647b1c9388c39f49e390ad6a19715934956 /sys/dev | |
| parent | 9bfaa34d66a527ca74c1c50f2d4837212ce83f40 (diff) | |
Replace ether_nonstatic_aton with a
- better named one
- not suffering from buffer oveflow
- simpler
- handling different separators
- returning error codes for errors
Some ideas from one posted on tech-net by Jonathan A. Kollasch
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/usb/if_cdce.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/usb/if_cdce.c b/sys/dev/usb/if_cdce.c index 525460e2309..fdd67b2d908 100644 --- a/sys/dev/usb/if_cdce.c +++ b/sys/dev/usb/if_cdce.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_cdce.c,v 1.28 2010/04/05 07:21:48 joerg Exp $ */ +/* $NetBSD: if_cdce.c,v 1.29 2010/05/19 20:41:59 christos Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2000-2003 Bill Paul <wpaul@windriver.com> @@ -41,7 +41,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_cdce.c,v 1.28 2010/04/05 07:21:48 joerg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_cdce.c,v 1.29 2010/05/19 20:41:59 christos Exp $"); #ifdef __NetBSD__ #include "opt_inet.h" #endif @@ -268,7 +268,7 @@ cdce_attach(device_t parent, device_t self, void *aux) memcpy(&eaddr[1], &hardclock_ticks, sizeof(u_int32_t)); eaddr[5] = (u_int8_t)(device_unit(sc->cdce_dev)); } else { - (void)ether_nonstatic_aton(eaddr, eaddr_str); + (void)ether_aton_r(eaddr, sizeof(eaddr), eaddr_str); } s = splnet(); |
