* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "protocol.h"
-
#include <string.h>
+#include "protocol.h"
static const uint32_t devopts[] = {
SR_CONF_THERMOMETER,
struct sr_dev_inst *sdi;
struct sr_config *src;
GSList *usb_devices, *devices, *l;
- int i;
+ unsigned int i;
const char *conn;
drvc = di->priv;
sdi->driver = di;
sdi->inst_type = SR_INST_USB;
sdi->conn = l->data;
- for (i = 0; i < 3; i++)
+ for (i = 0; i < ARRAY_SIZE(channel_names); i++)
sr_channel_new(sdi, i, SR_CHANNEL_ANALOG, TRUE,
channel_names[i]);
devc = g_malloc0(sizeof(struct dev_context));
return SR_ERR;
/*
- * The libusbx 1.0.9 darwin backend is broken: it can report a kernel
+ * The libusb 1.0.9 Darwin backend is broken: it can report a kernel
* driver being active, but detaching it always returns an error.
*/
#if !defined(__APPLE__)