Skip to content

Commit

Permalink
Move variable declarations at the beginning of function body to be ab…
Browse files Browse the repository at this point in the history
…le to compile using a stupid^W non C99 conform compiler under a non standard OS...
  • Loading branch information
neomilium committed Feb 17, 2010
1 parent b67dbe6 commit d97d017
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions src/lib/drivers/pn532_uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++)
{
Expand Down
2 changes: 1 addition & 1 deletion src/lib/drivers/pn53x_usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d97d017

Please sign in to comment.