diff options
author | Shawn Routhier <sar@isc.org> | 2011-05-11 00:38:56 +0000 |
---|---|---|
committer | Shawn Routhier <sar@isc.org> | 2011-05-11 00:38:56 +0000 |
commit | fb30f3fc8bb324c6be1a418c341d062d7e1603df (patch) | |
tree | fe8d7b827d4c31089ffe4721e02518dc0dbe9a90 /client/dhclient.c | |
parent | 9369bdc12134dcad9fc5362bc479cf689a37e06d (diff) | |
download | isc-dhcp-fb30f3fc8bb324c6be1a418c341d062d7e1603df.tar.gz |
Minor code cleanups - but note port change for #23196
[ISC-Bugs #23470] - Modify when an ignore return macro is defined to
handle unsed error return warnings for more versions of gcc.
[ISC-Bugs #23196] - Modify the reply handling in the server code to
send to a specified port rather than to the source port for the incoming
message. Sending to the source port was test code that should have
been removed. The previous functionality may be restored by defining
REPLY_TO_SOURCE_PORT in the includes/site.h file. We suggest you don't
enable this except for testing purposes.
[ISC-Bugs #22695] - Close a file descriptor in an error path.
[ISC-Bugs #19368] - Tidy up variable types in validate_port.
Diffstat (limited to 'client/dhclient.c')
-rw-r--r-- | client/dhclient.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/client/dhclient.c b/client/dhclient.c index 30ecb15c..5d556cde 100644 --- a/client/dhclient.c +++ b/client/dhclient.c @@ -3445,9 +3445,10 @@ void write_client_pid_file () } pf = fdopen (pfdesc, "w"); - if (!pf) + if (!pf) { + close(pfdesc); log_error ("Can't fdopen %s: %m", path_dhclient_pid); - else { + } else { fprintf (pf, "%ld\n", (long)getpid ()); fclose (pf); } |