std: use #ifdef rather than #if where the constant may not be defined
This commit is contained in:
parent
ab988ecb23
commit
45357ce64f
4
std.c
4
std.c
|
@ -264,11 +264,11 @@ SR_PRIV int std_dev_clear(const struct sr_dev_driver *driver,
|
||||||
driver->dev_close(sdi);
|
driver->dev_close(sdi);
|
||||||
|
|
||||||
if (sdi->conn) {
|
if (sdi->conn) {
|
||||||
#if HAVE_LIBSERIALPORT
|
#ifdef HAVE_LIBSERIALPORT
|
||||||
if (sdi->inst_type == SR_INST_SERIAL)
|
if (sdi->inst_type == SR_INST_SERIAL)
|
||||||
sr_serial_dev_inst_free(sdi->conn);
|
sr_serial_dev_inst_free(sdi->conn);
|
||||||
#endif
|
#endif
|
||||||
#if HAVE_LIBUSB_1_0
|
#ifdef HAVE_LIBUSB_1_0
|
||||||
if (sdi->inst_type == SR_INST_USB)
|
if (sdi->inst_type == SR_INST_USB)
|
||||||
sr_usb_dev_inst_free(sdi->conn);
|
sr_usb_dev_inst_free(sdi->conn);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue