Move variable declarations at the beginning of function body to be able to compile using a stupid^W non C99 conform compiler under a non standard OS...

This commit is contained in:
Romuald Conty 2010-02-17 14:48:41 +00:00
parent b67dbe668b
commit d97d017853
2 changed files with 7 additions and 7 deletions

View file

@ -87,20 +87,20 @@ pn532_uart_pick_device (void)
bool
pn532_uart_list_devices(nfc_device_desc_t pnddDevices[], size_t szDevices, size_t *pszDeviceFound)
{
serial_port sp;
char acConnect[BUFFER_LENGTH];
int iDevice;
*pszDeviceFound = 0;
/* @note: Due to UART bus we can't know if its really a pn532 without
* sending some PN53x commands. But using this way to probe devices, we can
* have serious problem with other device on this bus */
*pszDeviceFound = 0;
#ifndef SERIAL_AUTOPROBE_ENABLED
INFO("%s", "Sorry, serial auto-probing have been disabled at compile time.");
return false;
#else /* SERIAL_AUTOPROBE_ENABLED */
serial_port sp;
char acConnect[BUFFER_LENGTH];
int iDevice;
// I have no idea how MAC OS X deals with multiple devices, so a quick workaround
for (iDevice=0; iDevice<DRIVERS_MAX_DEVICES; iDevice++)
{

View file

@ -159,12 +159,12 @@ nfc_device_t* pn53x_usb_connect(const nfc_device_desc_t* pndd,const char * targe
usb_spec_t us;
struct usb_bus *bus;
struct usb_device *dev;
uint32_t uiBusIndex;
us.uiEndPointIn = 0;
us.uiEndPointOut = 0;
us.pudh = NULL;
uint32_t uiBusIndex;
// must specify device to connect to
if(pndd == NULL) return NULL;