Fix compile warnings in parallel.c

pull/104/head
Michael Black 2019-05-21 12:42:39 -05:00
rodzic ad9bcf66c5
commit 151a7059c5
1 zmienionych plików z 6 dodań i 2 usunięć

Wyświetl plik

@ -681,9 +681,11 @@ int par_ptt_get(hamlib_port_t *p, ptt_t *pttx)
status = par_read_control(p, &ctl);
par_unlock(p);
*pttx = (ctl & PARPORT_CONTROL_INIT) &&
if (status == RIG_OK) {
*pttx = (ctl & PARPORT_CONTROL_INIT) &&
!(ctl & PARPORT_CONTROL_STROBE) ?
RIG_PTT_ON : RIG_PTT_OFF;
}
return status;
}
@ -717,8 +719,10 @@ int par_dcd_get(hamlib_port_t *p, dcd_t *dcdx)
int status;
status = par_read_data(p, &reg);
*dcdx = reg & (1 << p->parm.parallel.pin) ?
if (status == RIG_OK) {
*dcdx = reg & (1 << p->parm.parallel.pin) ?
RIG_DCD_ON : RIG_DCD_OFF;
}
return status;
}