diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2004-05-04 20:28:41 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2004-05-04 20:28:41 +0000 |
commit | 78b219154584e6aec9e0b5a2fa3390b0df3e5d9c (patch) | |
tree | 965c99cd0b99933d2138158869d13936a481500f /sbin/dhclient/dispatch.c | |
parent | 87c56ed5afea12c4e09fc8f649a6d48ffab4b6d0 (diff) |
remove things not used, spotted by lint mostly; ok henning
Diffstat (limited to 'sbin/dhclient/dispatch.c')
-rw-r--r-- | sbin/dhclient/dispatch.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sbin/dhclient/dispatch.c b/sbin/dhclient/dispatch.c index 2ea7b860a7f..0f9723b1933 100644 --- a/sbin/dhclient/dispatch.c +++ b/sbin/dhclient/dispatch.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dispatch.c,v 1.24 2004/05/04 18:58:50 deraadt Exp $ */ +/* $OpenBSD: dispatch.c,v 1.25 2004/05/04 20:28:40 deraadt Exp $ */ /* * Copyright 2004 Henning Brauer <henning@openbsd.org> @@ -89,6 +89,7 @@ discover_interfaces(struct interface_info *iface) if (ifa->ifa_addr->sa_family == AF_LINK) { struct sockaddr_dl *foo = (struct sockaddr_dl *)ifa->ifa_addr; + iface->index = foo->sdl_index; iface->hw_address.hlen = foo->sdl_alen; iface->hw_address.htype = HTYPE_ETHER; /* XXX */ @@ -122,7 +123,6 @@ discover_interfaces(struct interface_info *iface) if_register_receive(iface); if_register_send(iface); add_protocol(iface->name, iface->rfdesc, got_one, iface); - freeifaddrs(ifap); } @@ -185,9 +185,7 @@ another: to_msec = -1; /* Set up the descriptors to be polled. */ - i = 0; - - for (l = protocols; l; l = l->next) { + for (i = 0, l = protocols; l; l = l->next) { struct interface_info *ip = l->local; if (ip && (l->handler != got_one || !ip->dead)) { fds[i].fd = l->fd; |