- fixes unused varable and coparison of different var types
This commit is contained in:
parent
6f2a7a5bdb
commit
6be01b2c1a
29
acpid-2.0.7-unused.patch
Normal file
29
acpid-2.0.7-unused.patch
Normal file
@ -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;
|
||||||
|
}
|
@ -1,7 +1,7 @@
|
|||||||
Summary: ACPI Event Daemon
|
Summary: ACPI Event Daemon
|
||||||
Name: acpid
|
Name: acpid
|
||||||
Version: 2.0.7
|
Version: 2.0.7
|
||||||
Release: 2%{?dist}
|
Release: 3%{?dist}
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
Group: System Environment/Daemons
|
Group: System Environment/Daemons
|
||||||
Source: http://tedfelix.com/linux/acpid-%{version}.tar.gz
|
Source: http://tedfelix.com/linux/acpid-%{version}.tar.gz
|
||||||
@ -13,6 +13,7 @@ Source5: acpid.service
|
|||||||
Source6: acpid.sysconfig
|
Source6: acpid.sysconfig
|
||||||
|
|
||||||
Patch1: acpid-2.0.2-makefile.patch
|
Patch1: acpid-2.0.2-makefile.patch
|
||||||
|
Patch2: acpid-2.0.7-unused.patch
|
||||||
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
ExclusiveArch: ia64 x86_64 %{ix86}
|
ExclusiveArch: ia64 x86_64 %{ix86}
|
||||||
@ -31,6 +32,7 @@ acpid is a daemon that dispatches ACPI events to user-space programs.
|
|||||||
%setup -q
|
%setup -q
|
||||||
|
|
||||||
%patch1 -p1 -b .makefile
|
%patch1 -p1 -b .makefile
|
||||||
|
%patch2 -p1 -b .unused
|
||||||
|
|
||||||
%build
|
%build
|
||||||
make %{?_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
@ -116,6 +118,9 @@ if [ "$1" -ge "1" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Feb 09 2011 Jiri Skala <jskala@redhat.com> - 2.0.7-3
|
||||||
|
- fixes unused varable and coparison of different var types
|
||||||
|
|
||||||
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.7-2
|
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.7-2
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user