From: krw Date: Thu, 15 Jun 2017 17:06:17 +0000 (+0000) Subject: Nuke unused parameter 'client_addr' from the 'handlers', i.e. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=d0c924234077488d1e40bda5a79c04ed30abae34;p=openbsd Nuke unused parameter 'client_addr' from the 'handlers', i.e. dhcpoffer(), dhcpack(), dhcpnak(). --- diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c index c73ec232fc3..868ac29b87b 100644 --- a/sbin/dhclient/dhclient.c +++ b/sbin/dhclient/dhclient.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dhclient.c,v 1.426 2017/06/15 16:56:11 krw Exp $ */ +/* $OpenBSD: dhclient.c,v 1.427 2017/06/15 17:06:17 krw Exp $ */ /* * Copyright 2004 Henning Brauer @@ -895,8 +895,7 @@ state_selecting(struct interface_info *ifi) } void -dhcpack(struct interface_info *ifi, struct in_addr client_addr, - struct option_data *options, char *info) +dhcpack(struct interface_info *ifi, struct option_data *options, char *info) { struct client_lease *lease; @@ -1111,8 +1110,7 @@ state_bound(struct interface_info *ifi) } void -dhcpoffer(struct interface_info *ifi, struct in_addr client_addr, - struct option_data *options, char *info) +dhcpoffer(struct interface_info *ifi, struct option_data *options, char *info) { struct dhcp_packet *packet = &ifi->recv_packet; struct client_lease *lease, *lp; @@ -1328,8 +1326,7 @@ packet_to_lease(struct interface_info *ifi, struct option_data *options) } void -dhcpnak(struct interface_info *ifi, struct in_addr client_addr, - struct option_data *options, char *info) +dhcpnak(struct interface_info *ifi, struct option_data *options, char *info) { if (ifi->state != S_REBOOTING && ifi->state != S_REQUESTING && diff --git a/sbin/dhclient/dhcpd.h b/sbin/dhclient/dhcpd.h index 7baa7db0696..4bfa2d81261 100644 --- a/sbin/dhclient/dhcpd.h +++ b/sbin/dhclient/dhcpd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: dhcpd.h,v 1.181 2017/06/14 20:27:08 krw Exp $ */ +/* $OpenBSD: dhcpd.h,v 1.182 2017/06/15 17:06:17 krw Exp $ */ /* * Copyright (c) 2004 Henning Brauer @@ -235,12 +235,9 @@ extern char *path_dhclient_db; extern int log_perror; extern int routefd; -void dhcpoffer(struct interface_info *, struct in_addr, struct option_data *, - char *); -void dhcpack(struct interface_info *, struct in_addr, struct option_data *, - char *); -void dhcpnak(struct interface_info *, struct in_addr, struct option_data *, - char *); +void dhcpoffer(struct interface_info *, struct option_data *, char *); +void dhcpack(struct interface_info *, struct option_data *,char *); +void dhcpnak(struct interface_info *, struct option_data *,char *); void free_client_lease(struct client_lease *); diff --git a/sbin/dhclient/options.c b/sbin/dhclient/options.c index 80fbc83328e..612632f02fc 100644 --- a/sbin/dhclient/options.c +++ b/sbin/dhclient/options.c @@ -1,4 +1,4 @@ -/* $OpenBSD: options.c,v 1.91 2017/06/14 16:09:42 krw Exp $ */ +/* $OpenBSD: options.c,v 1.92 2017/06/15 17:06:17 krw Exp $ */ /* DHCP options parsing and reassembly. */ @@ -636,8 +636,7 @@ do_packet(struct interface_info *ifi, unsigned int from_port, struct dhcp_packet *packet = &ifi->recv_packet; struct option_data options[256]; struct reject_elem *ap; - void (*handler)(struct interface_info *, struct in_addr, - struct option_data *, char *); + void (*handler)(struct interface_info *, struct option_data *, char *); char *type, *info; int i, rslt, options_valid = 1; @@ -753,7 +752,7 @@ do_packet(struct interface_info *ifi, unsigned int from_port, fatalx("no memory for info string"); if (handler) - (*handler)(ifi, from, options, info); + (*handler)(ifi, options, info); free(info);