don't erroneously use logical "&&" instead of binary "&" at some places in

the canon driver
This commit is contained in:
Nils Philippsen 2007-04-24 07:14:48 +00:00
parent 0a2451f7a8
commit 8ce3a6d247
2 changed files with 27 additions and 3 deletions

View File

@ -0,0 +1,18 @@
--- sane-backends-1.0.18/backend/canon.c.logical_vs_binary 2006-06-19 23:07:52.000000000 +0200
+++ sane-backends-1.0.18/backend/canon.c 2007-04-24 09:08:56.000000000 +0200
@@ -246,12 +246,12 @@
TPU_STAT_INACTIVE : TPU_STAT_NONE;
if (dev->tpu.Status == SANE_TRUE) /* TPU available */
{
- dev->tpu.Status = (tbuf[2 + 4 + 5] && 0x04) ?
+ dev->tpu.Status = (tbuf[2 + 4 + 5] & 0x04) ?
TPU_STAT_INACTIVE : TPU_STAT_ACTIVE;
}
- dev->tpu.ControlMode = tbuf[3 + 4 + 5] && 0x03;
+ dev->tpu.ControlMode = tbuf[3 + 4 + 5] & 0x03;
dev->tpu.Transparency = tbuf[4 + 4 + 5] * 256 + tbuf[5 + 4 + 5];
- dev->tpu.PosNeg = tbuf[6 + 4 + 5] && 0x01;
+ dev->tpu.PosNeg = tbuf[6 + 4 + 5] & 0x01;
dev->tpu.FilmType = tbuf[7 + 4 + 5];
DBG (11, "TPU Status: %d\n", dev->tpu.Status);

View File

@ -18,7 +18,7 @@
Summary: Scanner access software Summary: Scanner access software
Name: sane-backends Name: sane-backends
Version: 1.0.18 Version: 1.0.18
Release: 5%{?dist} Release: 6%{?dist}
License: GPL (programs), relaxed LGPL (libraries), and public domain (docs) License: GPL (programs), relaxed LGPL (libraries), and public domain (docs)
Group: System Environment/Libraries Group: System Environment/Libraries
Source0: ftp://ftp.sane-project.org/pub/sane/%{name}-%{version}/%{name}-%{version}.tar.gz Source0: ftp://ftp.sane-project.org/pub/sane/%{name}-%{version}/%{name}-%{version}.tar.gz
@ -26,7 +26,8 @@ Source1: sane.png
Patch1: sane-backends-1.0.18-rpath.patch Patch1: sane-backends-1.0.18-rpath.patch
Patch2: sane-backends-1.0.12-badcode.patch Patch2: sane-backends-1.0.12-badcode.patch
Patch3: sane-backends-multilib.patch Patch3: sane-backends-multilib.patch
Patch5: sane-backends-1.0.17-pkgconfig.patch Patch4: sane-backends-1.0.17-pkgconfig.patch
Patch5: sane-backends-1.0.18-logical_vs_binary.patch
URL: http://www.sane-project.org URL: http://www.sane-project.org
BuildRoot: %{_tmppath}/%{name}-%{version}-root-%(%__id_u -n) BuildRoot: %{_tmppath}/%{name}-%{version}-root-%(%__id_u -n)
BuildRequires: tetex-latex libusb-devel libieee1284-devel libjpeg-devel BuildRequires: tetex-latex libusb-devel libieee1284-devel libjpeg-devel
@ -105,7 +106,8 @@ want to access digital cameras.
%patch1 -p1 -b .rpath %patch1 -p1 -b .rpath
%patch2 -p1 -b .badcode %patch2 -p1 -b .badcode
%patch3 -p1 -b .multilib %patch3 -p1 -b .multilib
%patch5 -p1 -b .pkgconfig %patch4 -p1 -b .pkgconfig
%patch5 -p1 -b .logical_vs_binary
# Fix bug #62847. # Fix bug #62847.
perl -pi -e 's,/dev/usbscanner0?,/dev/usb/scanner0,' backend/*.conf perl -pi -e 's,/dev/usbscanner0?,/dev/usb/scanner0,' backend/*.conf
@ -228,6 +230,10 @@ rm -rf %{buildroot}
%{_libdir}/pkgconfig/sane-backends.pc %{_libdir}/pkgconfig/sane-backends.pc
%changelog %changelog
* Tue Apr 24 2007 Nils Philippsen <nphilipp@redhat.com> - 1.0.18-6
- don't erroneously use logical "&&" instead of binary "&" at some places in
the canon driver
* Fri Oct 13 2006 Nils Philippsen <nphilipp@redhat.com> - 1.0.18-5 * Fri Oct 13 2006 Nils Philippsen <nphilipp@redhat.com> - 1.0.18-5
- use %%rhel, not %%redhat - use %%rhel, not %%redhat