udhcp: add inline docs; small code shrink

function                                             old     new   delta
send_packet                                          103      87     -16
udhcpc_main                                         2359    2323     -36
This commit is contained in:
Denis Vlasenko
2008-09-26 23:45:20 +00:00
parent 7d9399e8dc
commit 739e30fbc3
6 changed files with 64 additions and 41 deletions

View File

@@ -50,7 +50,7 @@ static int send_packet_to_client(struct dhcpMessage *payload, int force_broadcas
DEBUG("unicasting packet to client ciaddr");
ciaddr = payload->ciaddr;
chaddr = payload->chaddr;
} else if (ntohs(payload->flags) & BROADCAST_FLAG) {
} else if (payload->flags & htons(BROADCAST_FLAG)) {
DEBUG("broadcasting packet to client (requested)");
ciaddr = INADDR_BROADCAST;
chaddr = MAC_BCAST_ADDR;