return RTLSDR_TUNER_UNKNOWN (0) on failure of rtlsdr_get_tuner_type

master
Dimitri Stolnikov 13 years ago
parent 4e2a0ea0c4
commit 88cd4b33cf
  1. 2
      include/rtl-sdr.h
  2. 2
      src/librtlsdr.c

@ -138,7 +138,7 @@ enum rtlsdr_tuner {
* Get the tuner type. * Get the tuner type.
* *
* \param dev the device handle given by rtlsdr_open() * \param dev the device handle given by rtlsdr_open()
* \return <= 0 on error, tuner type otherwise * \return RTLSDR_TUNER_UNKNOWN on error, tuner type otherwise
*/ */
RTLSDR_API enum rtlsdr_tuner rtlsdr_get_tuner_type(rtlsdr_dev_t *dev); RTLSDR_API enum rtlsdr_tuner rtlsdr_get_tuner_type(rtlsdr_dev_t *dev);

@ -695,7 +695,7 @@ int rtlsdr_get_freq_correction(rtlsdr_dev_t *dev)
enum rtlsdr_tuner rtlsdr_get_tuner_type(rtlsdr_dev_t *dev) enum rtlsdr_tuner rtlsdr_get_tuner_type(rtlsdr_dev_t *dev)
{ {
if (!dev) if (!dev)
return -1; return RTLSDR_TUNER_UNKNOWN;
return dev->tuner_type; return dev->tuner_type;
} }

Loading…
Cancel
Save