Don't #include <libusb.h> from ftdi.h
[libftdi] / src / ftdi_stream.c
index b949999..cf3acf5 100644 (file)
@@ -41,6 +41,7 @@
 
 #include <stdlib.h>
 #include <stdio.h>
+#include <libusb.h>
 
 #include "ftdi.h"
 
@@ -73,7 +74,7 @@ ftdi_readstream_cb(struct libusb_transfer *transfer)
        uint8_t *ptr = transfer->buffer;
        int length = transfer->actual_length;
        int numPackets = (length + packet_size - 1) / packet_size;
-       int res;
+       int res = 0;
 
        for (i = 0; i < numPackets; i++)
        {