Polished patches according to results from static analysis of code.

This commit is contained in:
Jiri Popelka 2011-03-25 16:25:39 +01:00
parent 846f73bce1
commit 2b40dd8d32
4 changed files with 8 additions and 8 deletions

View File

@ -1,7 +1,7 @@
diff -up dhcp-4.2.0/client/dhc6.c.honor-expired dhcp-4.2.0/client/dhc6.c
--- dhcp-4.2.0/client/dhc6.c.honor-expired 2010-10-07 12:55:37.000000000 +0200
+++ dhcp-4.2.0/client/dhc6.c 2010-10-07 12:56:43.000000000 +0200
@@ -1405,6 +1405,35 @@ start_info_request6(struct client_state
@@ -1405,6 +1405,32 @@ start_info_request6(struct client_state
go_daemon();
}
@ -14,9 +14,6 @@ diff -up dhcp-4.2.0/client/dhc6.c.honor-expired dhcp-4.2.0/client/dhc6.c
+ struct dhc6_ia *ia;
+ struct dhc6_addr *addr;
+
+ if (lease == NULL)
+ return;
+
+ for (ia = lease->bindings ; ia != NULL ; ia = ia->next) {
+ for (addr = ia->addrs ; addr != NULL ; addr = addr->next) {
+ if (addr->flags & DHC6_ADDR_EXPIRED)

View File

@ -31,7 +31,7 @@ diff -up dhcp-4.2.0/client/dhclient.c.ifup dhcp-4.2.0/client/dhclient.c
+ pfx = dpfx;
+
+ for (ip = interfaces; ip; ip = ip->next) {
+ if (interfaces_requested && (ip->flags & (INTERFACE_REQUESTED)) && (ip->name != NULL)) {
+ if (interfaces_requested && (ip->flags & (INTERFACE_REQUESTED))) {
+ int n_len = strlen(ip->name);
+
+ new_path_dhclient_pid = (char*) malloc(pfx + n_len + 6);

View File

@ -167,8 +167,8 @@ diff -up dhcp-4.2.0/common/options.c.rfc3442 dhcp-4.2.0/common/options.c
*/
priority_list[priority_len++] = DHO_SUBNET_MASK;
- priority_list[priority_len++] = DHO_ROUTERS;
+ if (op = lookup_option(&dhcp_universe, cfg_options,
+ DHO_CLASSLESS_STATIC_ROUTES))
+ if (lookup_option(&dhcp_universe, cfg_options,
+ DHO_CLASSLESS_STATIC_ROUTES))
+ priority_list[priority_len++] = DHO_CLASSLESS_STATIC_ROUTES;
+ else
+ priority_list[priority_len++] = DHO_ROUTERS;

View File

@ -16,7 +16,7 @@
Summary: Dynamic host configuration protocol software
Name: dhcp
Version: 4.2.1
Release: 2%{?dist}
Release: 3%{?dist}
# NEVER CHANGE THE EPOCH on this package. The previous maintainer (prior to
# dcantrell maintaining the package) made incorrect use of the epoch and
# that's why it is at 12 now. It should have never been used, but it was.
@ -630,6 +630,9 @@ fi
%attr(0644,root,root) %{_mandir}/man3/omapi.3.gz
%changelog
* Fri Mar 25 2011 Jiri Popelka <jpopelka@redhat.com> - 12:4.2.1-3
- Polished patches according to results from static analysis of code.
* Mon Mar 07 2011 Rex Dieter <rdieter@fedoraproject.org> - 12:4.2.1-2
- rebuild (bind)