summaryrefslogtreecommitdiff
path: root/sanei/sanei_pio.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2020-09-10 19:11:27 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2020-09-10 19:11:27 +0200
commit7e9455b3b15671ff99ed168638c405e2acedb6df (patch)
tree444e59ece236e09dc153f665e42160aeb0208c24 /sanei/sanei_pio.c
parentbc8a517abd2e11e1435f4ef042cfcc8648b62ef7 (diff)
parentbce41b3c37c2a68e7dab234ce0247755a61ceb40 (diff)
Merge branch 'release/debian/1.0.31-1_experimental1' into masterdebian/1.0.31-1_experimental1
Diffstat (limited to 'sanei/sanei_pio.c')
-rw-r--r--sanei/sanei_pio.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sanei/sanei_pio.c b/sanei/sanei_pio.c
index 3290704..8b67093 100644
--- a/sanei/sanei_pio.c
+++ b/sanei/sanei_pio.c
@@ -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)