[acpid/f15/master] - fixes unused varable and coparison of different var types

Jiri Skala jskala at fedoraproject.org
Fri Feb 11 06:54:16 UTC 2011


commit 819a05aa3ab2c4d9cae22d6111e819ab7e33321c
Author: Jiri Skala <jskala at skalniknb.(none)>
Date:   Fri Feb 11 07:54:58 2011 +0100

    - fixes unused varable and coparison of different var types

 acpid-2.0.7-unused.patch |   29 +++++++++++++++++++++++++++++
 acpid.spec               |    7 ++++++-
 2 files changed, 35 insertions(+), 1 deletions(-)
---
diff --git a/acpid-2.0.7-unused.patch b/acpid-2.0.7-unused.patch
new file mode 100644
index 0000000..3d7e7d3
--- /dev/null
+++ b/acpid-2.0.7-unused.patch
@@ -0,0 +1,29 @@
+diff -up acpid-2.0.7/libnetlink.c.unused acpid-2.0.7/libnetlink.c
+--- acpid-2.0.7/libnetlink.c.unused	2011-02-09 16:57:55.922298993 +0100
++++ acpid-2.0.7/libnetlink.c	2011-02-09 16:59:02.927298890 +0100
+@@ -441,7 +441,7 @@ int rtnl_from_file(FILE *rtnl, rtnl_filt
+ 	nladdr.nl_groups = 0;
+ 
+ 	while (1) {
+-		int err, len, type;
++		int err, len;
+ 		int l;
+ 
+ 		status = fread(&buf, 1, sizeof(*h), rtnl);
+@@ -456,7 +456,6 @@ int rtnl_from_file(FILE *rtnl, rtnl_filt
+ 			return 0;
+ 
+ 		len = h->nlmsg_len;
+-		type= h->nlmsg_type;
+ 		l = len - sizeof(*h);
+ 
+ 		if (l<0 || (unsigned)len>sizeof(buf)) {
+@@ -518,7 +517,7 @@ int addattr_l(struct nlmsghdr *n, int ma
+ 
+ int addraw_l(struct nlmsghdr *n, int maxlen, const void *data, int len)
+ {
+-	if ((int)NLMSG_ALIGN(n->nlmsg_len) + NLMSG_ALIGN(len) > maxlen) {
++	if ((int)NLMSG_ALIGN(n->nlmsg_len) + (int)NLMSG_ALIGN(len) > maxlen) {
+ 		fprintf(stderr, "addraw_l ERROR: message exceeded bound of %d\n",maxlen);
+ 		return -1;
+ 	}
diff --git a/acpid.spec b/acpid.spec
index 7a1f606..7e981e7 100644
--- a/acpid.spec
+++ b/acpid.spec
@@ -1,7 +1,7 @@
 Summary: ACPI Event Daemon
 Name: acpid
 Version: 2.0.7
-Release: 2%{?dist}
+Release: 3%{?dist}
 License: GPLv2+
 Group: System Environment/Daemons
 Source: http://tedfelix.com/linux/acpid-%{version}.tar.gz
@@ -13,6 +13,7 @@ Source5: acpid.service
 Source6: acpid.sysconfig
 
 Patch1: acpid-2.0.2-makefile.patch
+Patch2: acpid-2.0.7-unused.patch
 
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 ExclusiveArch: ia64 x86_64 %{ix86}
@@ -31,6 +32,7 @@ acpid is a daemon that dispatches ACPI events to user-space programs.
 %setup -q
 
 %patch1 -p1 -b .makefile
+%patch2 -p1 -b .unused
 
 %build
 make %{?_smp_mflags}
@@ -116,6 +118,9 @@ if [ "$1" -ge "1" ]; then
 fi
 
 %changelog
+* Wed Feb 09 2011 Jiri Skala <jskala at redhat.com> - 2.0.7-3
+- fixes unused varable and coparison of different var types
+
 * Mon Feb 07 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.0.7-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
 


More information about the scm-commits mailing list