summaryrefslogtreecommitdiff
path: root/src/lib/libc/net/ethers.c
diff options
context:
space:
mode:
authorotto <>2005-03-25 13:24:12 +0000
committerotto <>2005-03-25 13:24:12 +0000
commit2f490723a2e673b2457f65c4b06cacb7d700a3e8 (patch)
treec9dcd3a58da3f7404d9e626fe10abdd67c384fba /src/lib/libc/net/ethers.c
parent9a03506f8308b6023a12f108a2072feb958607a6 (diff)
downloadopenbsd-2f490723a2e673b2457f65c4b06cacb7d700a3e8.tar.gz
openbsd-2f490723a2e673b2457f65c4b06cacb7d700a3e8.tar.bz2
openbsd-2f490723a2e673b2457f65c4b06cacb7d700a3e8.zip
ansify. ok deraadt@ moritz@
Diffstat (limited to 'src/lib/libc/net/ethers.c')
-rw-r--r--src/lib/libc/net/ethers.c27
1 files changed, 8 insertions, 19 deletions
diff --git a/src/lib/libc/net/ethers.c b/src/lib/libc/net/ethers.c
index 2c1e562245..0a86a30af2 100644
--- a/src/lib/libc/net/ethers.c
+++ b/src/lib/libc/net/ethers.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ethers.c,v 1.17 2004/02/16 19:41:12 otto Exp $ */ 1/* $OpenBSD: ethers.c,v 1.18 2005/03/25 13:24:11 otto Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com> 4 * Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>
@@ -23,7 +23,7 @@
23 */ 23 */
24 24
25#if defined(LIBC_SCCS) && !defined(lint) 25#if defined(LIBC_SCCS) && !defined(lint)
26static char rcsid[] = "$OpenBSD: ethers.c,v 1.17 2004/02/16 19:41:12 otto Exp $"; 26static char rcsid[] = "$OpenBSD: ethers.c,v 1.18 2005/03/25 13:24:11 otto Exp $";
27#endif /* LIBC_SCCS and not lint */ 27#endif /* LIBC_SCCS and not lint */
28 28
29#include <sys/types.h> 29#include <sys/types.h>
@@ -49,8 +49,7 @@ static char rcsid[] = "$OpenBSD: ethers.c,v 1.17 2004/02/16 19:41:12 otto Exp $"
49static char * _ether_aton(char *, struct ether_addr *); 49static char * _ether_aton(char *, struct ether_addr *);
50 50
51char * 51char *
52ether_ntoa(e) 52ether_ntoa(struct ether_addr *e)
53 struct ether_addr *e;
54{ 53{
55 static char a[] = "xx:xx:xx:xx:xx:xx"; 54 static char a[] = "xx:xx:xx:xx:xx:xx";
56 55
@@ -63,9 +62,7 @@ ether_ntoa(e)
63} 62}
64 63
65static char * 64static char *
66_ether_aton(s, e) 65_ether_aton(char *s, struct ether_addr *e)
67 char *s;
68 struct ether_addr *e;
69{ 66{
70 int i; 67 int i;
71 long l; 68 long l;
@@ -90,8 +87,7 @@ _ether_aton(s, e)
90} 87}
91 88
92struct ether_addr * 89struct ether_addr *
93ether_aton(s) 90ether_aton(char *s)
94 char *s;
95{ 91{
96 static struct ether_addr n; 92 static struct ether_addr n;
97 93
@@ -99,9 +95,7 @@ ether_aton(s)
99} 95}
100 96
101int 97int
102ether_ntohost(hostname, e) 98ether_ntohost(char *hostname, struct ether_addr *e)
103 char *hostname;
104 struct ether_addr *e;
105{ 99{
106 FILE *f; 100 FILE *f;
107 char buf[BUFSIZ+1], *p; 101 char buf[BUFSIZ+1], *p;
@@ -163,9 +157,7 @@ ether_ntohost(hostname, e)
163} 157}
164 158
165int 159int
166ether_hostton(hostname, e) 160ether_hostton(char *hostname, struct ether_addr *e)
167 char *hostname;
168 struct ether_addr *e;
169{ 161{
170 FILE *f; 162 FILE *f;
171 char buf[BUFSIZ+1], *p; 163 char buf[BUFSIZ+1], *p;
@@ -218,10 +210,7 @@ ether_hostton(hostname, e)
218} 210}
219 211
220int 212int
221ether_line(line, e, hostname) 213ether_line(char *line, struct ether_addr *e, char *hostname)
222 char *line;
223 struct ether_addr *e;
224 char *hostname;
225{ 214{
226 char *p; 215 char *p;
227 size_t n; 216 size_t n;