summaryrefslogtreecommitdiff
path: root/sanei/sanei_pio.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2020-08-24 18:45:55 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2020-08-24 18:45:55 +0200
commita77bc1fcbdf83cfdac9570c0a0ac886b5534c90f (patch)
treed839746371ecb8ed64ac81d2e37c11fcd25a00ac /sanei/sanei_pio.c
parent787fb1d54ec9ee5fb941ae897fb201feb9cb2fd1 (diff)
parent2b3e02411ecc09e7d41741b5587655c9b2f955b7 (diff)
Merge branch 'feature/upstream' into develop
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)