From: Antonio Ospite Date: Thu, 14 Jan 2016 14:00:38 +0000 (+0100) Subject: visomat-data-downloader: use a symbolic constant for the packet size X-Git-Url: https://git.ao2.it/visomat-utils.git/commitdiff_plain/802162fefcce3cda9325199d2fde2e897408e90a?ds=inline visomat-data-downloader: use a symbolic constant for the packet size --- diff --git a/src/visomat-data-downloader.c b/src/visomat-data-downloader.c index 574bb13..a5405a4 100644 --- a/src/visomat-data-downloader.c +++ b/src/visomat-data-downloader.c @@ -58,6 +58,7 @@ static void debug_dump_buffer(const char *filename, uint8_t *buffer, unsigned in #define VISOMAT_INTERFACE 1 #define VISOMAT_EP_IN 0x82 #define VISOMAT_EP_OUT 0x03 +#define VISOMAT_PACKET_SIZE 64 #define STX 0x02 #define ETX 0x03 @@ -281,7 +282,7 @@ static int get_response(libusb_device_handle *dev, { int ret; int transferred; - uint8_t response[64] = { 0 }; + uint8_t response[VISOMAT_PACKET_SIZE] = { 0 }; unsigned int i; i = 0;