2
0
mirror of https://gitlab.isc.org/isc-projects/dhcp synced 2025-08-31 14:25:41 +00:00

Clean up some compiler warnings

This commit is contained in:
Shawn Routhier
2010-02-02 00:44:06 +00:00
parent 3c941d426d
commit a35285748d
9 changed files with 35 additions and 26 deletions

View File

@@ -3782,13 +3782,13 @@ packet6_len_okay(const char *packet, int len) {
}
if ((packet[0] == DHCPV6_RELAY_FORW) ||
(packet[0] == DHCPV6_RELAY_REPL)) {
if (len >= sizeof(struct dhcpv6_relay_packet)) {
if (len >= offsetof(struct dhcpv6_relay_packet, options)) {
return 1;
} else {
return 0;
}
} else {
if (len >= sizeof(struct dhcpv6_packet)) {
if (len >= offsetof(struct dhcpv6_packet, options)) {
return 1;
} else {
return 0;