kopia lustrzana https://gitlab.com/sane-project/backends
Merge branch '114-sane-backends-1-0-28-sanei-sanei_pio-c-3-bad-test' into 'master'
Resolve "sane-backends-1.0.28/sanei/sanei_pio.c: 3 * bad test ?" Closes #114 See merge request sane-project/backends!362fix-build-obselete-jpeg
commit
6ab010939c
|
@ -495,7 +495,7 @@ sanei_pio_close (int fd)
|
|||
{
|
||||
Port p = port + fd;
|
||||
|
||||
if ((0 > fd) && (NELEMS (port) <= fd))
|
||||
if ((0 > fd) || (NELEMS (port) <= fd))
|
||||
return;
|
||||
|
||||
if (!p->in_use)
|
||||
|
@ -515,7 +515,7 @@ sanei_pio_close (int fd)
|
|||
int
|
||||
sanei_pio_read (int fd, u_char * buf, int n)
|
||||
{
|
||||
if ((0 > fd) && (NELEMS (port) <= fd))
|
||||
if ((0 > fd) || (NELEMS (port) <= fd))
|
||||
return -1;
|
||||
|
||||
if (!port[fd].in_use)
|
||||
|
@ -527,7 +527,7 @@ sanei_pio_read (int fd, u_char * buf, int n)
|
|||
int
|
||||
sanei_pio_write (int fd, const u_char * buf, int n)
|
||||
{
|
||||
if ((0 > fd) && (NELEMS (port) <= fd))
|
||||
if ((0 > fd) || (NELEMS (port) <= fd))
|
||||
return -1;
|
||||
|
||||
if (!port[fd].in_use)
|
||||
|
|
Ładowanie…
Reference in New Issue