mirror of
https://github.com/ipxe/ipxe
synced 2026-01-03 02:13:23 +03:00
[dhcp] Remove redundant length fields in struct dhcp_packet
The max_len field is never used, and the len field is used only by dhcp_tx(). Remove these two fields, and perform the necessary trivial calculation in dhcp_tx() instead. Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -1122,7 +1122,7 @@ static int dhcp_tx ( struct dhcp_session *dhcp ) {
|
||||
}
|
||||
|
||||
/* Transmit the packet */
|
||||
iob_put ( iobuf, dhcppkt.len );
|
||||
iob_put ( iobuf, dhcppkt_len ( &dhcppkt ) );
|
||||
if ( ( rc = xfer_deliver ( &dhcp->xfer, iob_disown ( iobuf ),
|
||||
&meta ) ) != 0 ) {
|
||||
DBGC ( dhcp, "DHCP %p could not transmit UDP packet: %s\n",
|
||||
|
||||
Reference in New Issue
Block a user