diff options
author | 2005-03-28 06:19:58 +0000 | |
---|---|---|
committer | 2005-03-28 06:19:58 +0000 | |
commit | 9f33d8a69f338ef247968fdba5f70289dcd14c89 (patch) | |
tree | 23e5c8eebd06c4ad7793392f95286e03fc97b723 | |
parent | Use USBD_DEFAULT_TIMEOUT on control transfers, rather than the SCSI request (diff) | |
download | wireguard-openbsd-9f33d8a69f338ef247968fdba5f70289dcd14c89.tar.xz wireguard-openbsd-9f33d8a69f338ef247968fdba5f70289dcd14c89.zip |
add some const to ether_*. remove bonus prototypes this brought out.
ok deraadt@
-rw-r--r-- | lib/libc/net/ethers.c | 14 | ||||
-rw-r--r-- | lib/libpcap/nametoaddr.c | 8 | ||||
-rw-r--r-- | sys/netinet/if_ether.h | 8 | ||||
-rw-r--r-- | usr.sbin/ypserv/stdethers/stdethers.c | 7 |
4 files changed, 15 insertions, 22 deletions
diff --git a/lib/libc/net/ethers.c b/lib/libc/net/ethers.c index 0a86a30af20..e46dcd70061 100644 --- a/lib/libc/net/ethers.c +++ b/lib/libc/net/ethers.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ethers.c,v 1.18 2005/03/25 13:24:11 otto Exp $ */ +/* $OpenBSD: ethers.c,v 1.19 2005/03/28 06:19:58 tedu Exp $ */ /* * Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com> @@ -23,7 +23,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: ethers.c,v 1.18 2005/03/25 13:24:11 otto Exp $"; +static char rcsid[] = "$OpenBSD: ethers.c,v 1.19 2005/03/28 06:19:58 tedu Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> @@ -46,7 +46,7 @@ static char rcsid[] = "$OpenBSD: ethers.c,v 1.18 2005/03/25 13:24:11 otto Exp $" #define _PATH_ETHERS "/etc/ethers" #endif -static char * _ether_aton(char *, struct ether_addr *); +static char * _ether_aton(const char *, struct ether_addr *); char * ether_ntoa(struct ether_addr *e) @@ -62,7 +62,7 @@ ether_ntoa(struct ether_addr *e) } static char * -_ether_aton(char *s, struct ether_addr *e) +_ether_aton(const char *s, struct ether_addr *e) { int i; long l; @@ -87,7 +87,7 @@ _ether_aton(char *s, struct ether_addr *e) } struct ether_addr * -ether_aton(char *s) +ether_aton(const char *s) { static struct ether_addr n; @@ -157,7 +157,7 @@ ether_ntohost(char *hostname, struct ether_addr *e) } int -ether_hostton(char *hostname, struct ether_addr *e) +ether_hostton(const char *hostname, struct ether_addr *e) { FILE *f; char buf[BUFSIZ+1], *p; @@ -210,7 +210,7 @@ ether_hostton(char *hostname, struct ether_addr *e) } int -ether_line(char *line, struct ether_addr *e, char *hostname) +ether_line(const char *line, struct ether_addr *e, char *hostname) { char *p; size_t n; diff --git a/lib/libpcap/nametoaddr.c b/lib/libpcap/nametoaddr.c index acf00ab1334..8c34a8b96c5 100644 --- a/lib/libpcap/nametoaddr.c +++ b/lib/libpcap/nametoaddr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nametoaddr.c,v 1.10 2004/01/27 06:58:03 tedu Exp $ */ +/* $OpenBSD: nametoaddr.c,v 1.11 2005/03/28 06:19:58 tedu Exp $ */ /* * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996 @@ -349,10 +349,6 @@ pcap_ether_hostton(const char *name) } #else -#if !defined(sgi) && !defined(__NetBSD__) -extern int ether_hostton(char *, struct ether_addr *); -#endif - /* Use the os supplied routines */ u_char * pcap_ether_hostton(const char *name) @@ -361,7 +357,7 @@ pcap_ether_hostton(const char *name) u_char a[6]; ap = NULL; - if (ether_hostton((char *)name, (struct ether_addr *)a) == 0) { + if (ether_hostton(name, (struct ether_addr *)a) == 0) { ap = (u_char *)malloc(6); if (ap != NULL) memcpy((char *)ap, (char *)a, 6); diff --git a/sys/netinet/if_ether.h b/sys/netinet/if_ether.h index 2da9f64a0a1..321e3252e03 100644 --- a/sys/netinet/if_ether.h +++ b/sys/netinet/if_ether.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ether.h,v 1.34 2004/09/23 18:21:41 brad Exp $ */ +/* $OpenBSD: if_ether.h,v 1.35 2005/03/28 06:19:58 tedu Exp $ */ /* $NetBSD: if_ether.h,v 1.22 1996/05/11 13:00:00 mycroft Exp $ */ /* @@ -299,10 +299,10 @@ u_int32_t ether_crc32_be(const u_int8_t *, size_t); __BEGIN_DECLS char *ether_ntoa(struct ether_addr *); -struct ether_addr *ether_aton(char *); +struct ether_addr *ether_aton(const char *); int ether_ntohost(char *, struct ether_addr *); -int ether_hostton(char *, struct ether_addr *); -int ether_line(char *, struct ether_addr *, char *); +int ether_hostton(const char *, struct ether_addr *); +int ether_line(const char *, struct ether_addr *, char *); __END_DECLS #endif /* _KERNEL */ diff --git a/usr.sbin/ypserv/stdethers/stdethers.c b/usr.sbin/ypserv/stdethers/stdethers.c index d978e06f51d..5faf4dadc48 100644 --- a/usr.sbin/ypserv/stdethers/stdethers.c +++ b/usr.sbin/ypserv/stdethers/stdethers.c @@ -1,4 +1,4 @@ -/* $OpenBSD: stdethers.c,v 1.11 2003/07/18 22:58:56 david Exp $ */ +/* $OpenBSD: stdethers.c,v 1.12 2005/03/28 06:19:58 tedu Exp $ */ /* * Copyright (c) 1995 Mats O Jansson <moj@stacken.kth.se> @@ -27,7 +27,7 @@ */ #ifndef LINT -static const char rcsid[] = "$OpenBSD: stdethers.c,v 1.11 2003/07/18 22:58:56 david Exp $"; +static const char rcsid[] = "$OpenBSD: stdethers.c,v 1.12 2005/03/28 06:19:58 tedu Exp $"; #endif #include <sys/types.h> @@ -40,9 +40,6 @@ static const char rcsid[] = "$OpenBSD: stdethers.c,v 1.11 2003/07/18 22:58:56 da #include <string.h> #include <ctype.h> -extern int ether_line(char *, struct ether_addr *, char *); -extern char *ether_ntoa(struct ether_addr *); - #ifndef NTOA_FIX #define NTOA(x) (char *)ether_ntoa(x) #else |