MFp4 @229471:

Remove unused argument from assemble_hw_header().

Reviewed by:	brooks
Sponsored by:	The FreeBSD Foundation
This commit is contained in:
Pawel Jakub Dawidek 2013-07-03 21:49:10 +00:00
parent 592291c1e7
commit d1f4d85494
3 changed files with 4 additions and 8 deletions

View File

@ -260,7 +260,7 @@ send_packet(struct interface_info *interface, struct dhcp_packet *raw,
/* Assemble the headers... */
if (to->sin_addr.s_addr == INADDR_BROADCAST)
assemble_hw_header(interface, buf, &bufp, NULL);
assemble_hw_header(interface, buf, &bufp);
assemble_udp_ip_header(buf, &bufp, from.s_addr,
to->sin_addr.s_addr, to->sin_port, (unsigned char *)raw, len);

View File

@ -405,8 +405,7 @@ void bootp(struct packet *);
void dhcp(struct packet *);
/* packet.c */
void assemble_hw_header(struct interface_info *, unsigned char *,
int *, struct hardware *);
void assemble_hw_header(struct interface_info *, unsigned char *, int *);
void assemble_udp_ip_header(unsigned char *, int *, u_int32_t, u_int32_t,
unsigned int, unsigned char *, int);
ssize_t decode_hw_header(unsigned char *, int, struct hardware *);

View File

@ -90,14 +90,11 @@ wrapsum(u_int32_t sum)
void
assemble_hw_header(struct interface_info *interface, unsigned char *buf,
int *bufix, struct hardware *to)
int *bufix)
{
struct ether_header eh;
if (to != NULL && to->hlen == 6) /* XXX */
memcpy(eh.ether_dhost, to->haddr, sizeof(eh.ether_dhost));
else
memset(eh.ether_dhost, 0xff, sizeof(eh.ether_dhost));
memset(eh.ether_dhost, 0xff, sizeof(eh.ether_dhost));
if (interface->hw_address.hlen == sizeof(eh.ether_shost))
memcpy(eh.ether_shost, interface->hw_address.haddr,
sizeof(eh.ether_shost));