diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2020-08-24 18:44:51 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2020-08-24 18:44:51 +0200 |
commit | ad38bc6ecb80ddeb562841b33258dd53659b1da6 (patch) | |
tree | e02e9c3ff760554fd87f70df0e18b88594091a48 /sanei/sanei_pio.c | |
parent | 9c23ed018d72eed2554f4f9cff1ae6e6bb0cd479 (diff) |
New upstream version 1.0.31upstream/1.0.31
Diffstat (limited to 'sanei/sanei_pio.c')
-rw-r--r-- | sanei/sanei_pio.c | 6 |
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) |