Check for (size_t) -1 doesn't work on 64 bit platforms as size_t is 64 bits

there while the length of a data block is defined as 32 bits in the SANE network
standard (bug #300837).
merge-requests/1/head
Henning Geinitz 2004-10-03 12:34:10 +00:00
rodzic f50c42d4fb
commit a70f09e4ca
3 zmienionych plików z 11 dodań i 7 usunięć

Wyświetl plik

@ -9,9 +9,13 @@
* doc/descriptions/unsupported.desc: Added Nikon LS-5000 ED (bug
#300972).
* include/sane/saneopts.h: Added option for turning off the
scanner's lamp on exit.
scanner's lamp on exit (bug #300963).
* backend/gt68xx.c backend/gt68xx_high.h: Used new lamp option
from saneopts.h.
from saneopts.h (bug #300963).
* backend/net.c doc/descriptions/net.desc: Check for (size_t) -1
doesn't work on 64 bit platforms as size_t is 64 bits there
while the length of a data block is defined as 32 bits in the
SANE network standard (bug #300837).
2004-10-02 Thomas Soumarmon <thomas.soumarmon@cogitae.net>

Wyświetl plik

@ -89,13 +89,13 @@
#if defined (HAVE_GETADDRINFO) && defined (HAVE_GETNAMEINFO)
# define NET_USES_AF_INDEP
# ifdef ENABLE_IPV6
# define NET_VERSION "1.0.12 (AF-indep+IPv6)"
# define NET_VERSION "1.0.13 (AF-indep+IPv6)"
# else
# define NET_VERSION "1.0.12 (AF-indep)"
# define NET_VERSION "1.0.13 (AF-indep)"
# endif /* ENABLE_IPV6 */
#else
# undef ENABLE_IPV6
# define NET_VERSION "1.0.12"
# define NET_VERSION "1.0.13"
#endif /* HAVE_GETADDRINFO && HAVE_GETNAMEINFO */
static SANE_Auth_Callback auth_callback;
@ -1790,7 +1790,7 @@ sane_read (SANE_Handle handle, SANE_Byte * data, SANE_Int max_length,
| ((u_long) s->reclen_buf[3] << 0));
DBG (3, "sane_read: next record length=%ld bytes\n",
(long) s->bytes_remaining);
if (s->bytes_remaining == (size_t) - 1)
if (s->bytes_remaining == 0xffffffff)
{
char ch;

Wyświetl plik

@ -1,5 +1,5 @@
:backend "net" ; name of backend
:version "1.0.12"
:version "1.0.13"
:manpage "sane-net"
:url "http://www.penguin-breeder.org/?page=sane-net"