Replace sizeof(struct dhcpMessage) with DHCP_SIZE.

This commit is contained in:
Nicholas J. Kain
2010-11-14 02:01:17 -05:00
parent 9421da3157
commit 4ce4323d00
2 changed files with 3 additions and 3 deletions

View File

@ -19,8 +19,8 @@ int get_packet(struct dhcpMessage *packet, int fd)
{
int bytes;
memset(packet, 0, sizeof(struct dhcpMessage));
bytes = safe_read(fd, (char *)packet, sizeof(struct dhcpMessage));
memset(packet, 0, DHCP_SIZE);
bytes = safe_read(fd, (char *)packet, DHCP_SIZE);
if (bytes == -1) {
log_line("Read on listen socket failed: %s", strerror(errno));
return -1;