summaryrefslogtreecommitdiff
path: root/sbin/dhclient/inet.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2004-05-04 21:48:17 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2004-05-04 21:48:17 +0000
commit5ec5305e22fc4dfccfa05a507821188925c211f7 (patch)
tree5ce5edc81fb58f84e1e5233dda4585ca36573d89 /sbin/dhclient/inet.c
parent5a6ba6e15fe81b53aabd942f225da0cd247f721f (diff)
knf
Diffstat (limited to 'sbin/dhclient/inet.c')
-rw-r--r--sbin/dhclient/inet.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sbin/dhclient/inet.c b/sbin/dhclient/inet.c
index 00635aa2b4d..a52847596e1 100644
--- a/sbin/dhclient/inet.c
+++ b/sbin/dhclient/inet.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: inet.c,v 1.6 2004/05/04 20:28:40 deraadt Exp $ */
+/* $OpenBSD: inet.c,v 1.7 2004/05/04 21:48:16 deraadt Exp $ */
/*
* Subroutines to manipulate internet addresses in a safely portable
@@ -73,8 +73,8 @@ subnet_number(struct iaddr addr, struct iaddr mask)
struct iaddr
broadcast_addr(struct iaddr subnet, struct iaddr mask)
{
- int i;
struct iaddr rv;
+ int i;
if (subnet.len != mask.len) {
rv.len = 0;
@@ -96,11 +96,12 @@ addr_eq(struct iaddr addr1, struct iaddr addr2)
return (memcmp(addr1.iabuf, addr2.iabuf, addr1.len) == 0);
}
-char *piaddr(struct iaddr addr)
+char *
+piaddr(struct iaddr addr)
{
static char pbuf[32];
- char *s;
struct in_addr a;
+ char *s;
memcpy(&a, &(addr.iabuf), sizeof(struct in_addr));