diff options
author | Tomek Mrugalski <tomek@isc.org> | 2012-03-09 11:18:14 +0000 |
---|---|---|
committer | Tomek Mrugalski <tomek@isc.org> | 2012-03-09 11:18:14 +0000 |
commit | dd9237c309ac816268ec395f0d65a18a38a9aa2a (patch) | |
tree | f79ad87307715109fdf0886a70b2c4c5c50a7983 /server/bootp.c | |
parent | 9a266235e6813d2565dc48949b222ba8e08078cb (diff) | |
download | isc-dhcp-dd9237c309ac816268ec395f0d65a18a38a9aa2a.tar.gz |
Fixed many compilation problems ("set, but not used" warnings) for
gcc 4.6 that may affect Ubuntu 11.10 users. [ISC-Bugs #27588]
Diffstat (limited to 'server/bootp.c')
-rw-r--r-- | server/bootp.c | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/server/bootp.c b/server/bootp.c index c88fab84..477bb045 100644 --- a/server/bootp.c +++ b/server/bootp.c @@ -3,7 +3,8 @@ BOOTP Protocol support. */ /* - * Copyright (c) 2004,2005,2007,2009 by Internet Systems Consortium, Inc. ("ISC") + * Copyright (c) 2009,2012 by Internet Systems Consortium, Inc. ("ISC") + * Copyright (c) 2004,2005,2007 by Internet Systems Consortium, Inc. ("ISC") * Copyright (c) 1995-2003 by Internet Software Consortium * * Permission to use, copy, modify, and distribute this software for any @@ -384,10 +385,16 @@ void bootp (packet) to.sin_port = local_port; if (fallback_interface) { - result = send_packet (fallback_interface, - (struct packet *)0, - &raw, outgoing.packet_length, - from, &to, &hto); + result = send_packet (fallback_interface, NULL, &raw, + outgoing.packet_length, from, + &to, &hto); + if (result < 0) { + log_error ("%s:%d: Failed to send %d byte long " + "packet over %s interface.", MDL, + outgoing.packet_length, + fallback_interface->name); + } + goto out; } @@ -407,10 +414,16 @@ void bootp (packet) } errno = 0; - result = send_packet (packet -> interface, - packet, &raw, outgoing.packet_length, - from, &to, &hto); + result = send_packet(packet->interface, packet, &raw, + outgoing.packet_length, from, &to, &hto); + if (result < 0) { + log_error ("%s:%d: Failed to send %d byte long packet over %s" + " interface.", MDL, outgoing.packet_length, + packet->interface->name); + } + out: + if (options) option_state_dereference (&options, MDL); if (lease) |