From ad53f2f1e3c5e06d52a21edcb0bbe499937eda83 Mon Sep 17 00:00:00 2001 From: Mike Black W9MDB Date: Sat, 21 Aug 2021 07:41:48 -0500 Subject: [PATCH] Fix typo in serial.c https://github.com/Hamlib/Hamlib/issues/768 --- src/serial.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/serial.c b/src/serial.c index 871a2a712..57d6eff7b 100644 --- a/src/serial.c +++ b/src/serial.c @@ -720,7 +720,7 @@ int ser_open(hamlib_port_t *p) * pathname is not uh_rig or uh_ptt: simply open() */ ret = OPEN(p->pathname, O_RDWR | O_NOCTTY | O_NDELAY); - if (ret == 1) // some serial ports fail to open 1st time + if (ret == -1) // some serial ports fail to open 1st time { rig_debug(RIG_DEBUG_WARN, "%s(%d): open failed#1\n", __func__, __LINE__); hl_usleep(500*1000);