[dhcp] Polished patches according to results from static analysis of code.
Jiří Popelka
jpopelka at fedoraproject.org
Fri Mar 25 15:28:33 UTC 2011
commit 2b40dd8d323e6ea2ea6c572f885451967126f16f
Author: Jiri Popelka <jpopelka at redhat.com>
Date: Fri Mar 25 16:25:39 2011 +0100
Polished patches according to results from static analysis of code.
dhcp-4.2.0-honor-expired.patch | 5 +----
dhcp-4.2.0-release-by-ifup.patch | 2 +-
dhcp-4.2.0-rfc3442-classless-static-routes.patch | 4 ++--
dhcp.spec | 5 ++++-
4 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/dhcp-4.2.0-honor-expired.patch b/dhcp-4.2.0-honor-expired.patch
index 45eadfa..0ae9128 100644
--- a/dhcp-4.2.0-honor-expired.patch
+++ b/dhcp-4.2.0-honor-expired.patch
@@ -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)
diff --git a/dhcp-4.2.0-release-by-ifup.patch b/dhcp-4.2.0-release-by-ifup.patch
index 1ad8213..300c5f3 100644
--- a/dhcp-4.2.0-release-by-ifup.patch
+++ b/dhcp-4.2.0-release-by-ifup.patch
@@ -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);
diff --git a/dhcp-4.2.0-rfc3442-classless-static-routes.patch b/dhcp-4.2.0-rfc3442-classless-static-routes.patch
index 440004d..d1292f5 100644
--- a/dhcp-4.2.0-rfc3442-classless-static-routes.patch
+++ b/dhcp-4.2.0-rfc3442-classless-static-routes.patch
@@ -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;
diff --git a/dhcp.spec b/dhcp.spec
index 5cb9635..41294e4 100644
--- a/dhcp.spec
+++ b/dhcp.spec
@@ -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 at redhat.com> - 12:4.2.1-3
+- Polished patches according to results from static analysis of code.
+
* Mon Mar 07 2011 Rex Dieter <rdieter at fedoraproject.org> - 12:4.2.1-2
- rebuild (bind)
More information about the scm-commits
mailing list