mirror of https://github.com/ARMmbed/mbed-os.git
reduce variable scope
parent
ba29bd9315
commit
33a2116042
|
@ -557,7 +557,7 @@ static err_t lpc_low_level_output(struct netif *netif, struct pbuf *p)
|
||||||
u8_t *dst;
|
u8_t *dst;
|
||||||
u32_t idx, notdmasafe = 0;
|
u32_t idx, notdmasafe = 0;
|
||||||
struct pbuf *np;
|
struct pbuf *np;
|
||||||
s32_t count, dn;
|
s32_t dn;
|
||||||
|
|
||||||
/* Zero-copy TX buffers may be fragmented across mutliple payload
|
/* Zero-copy TX buffers may be fragmented across mutliple payload
|
||||||
chains. Determine the number of descriptors needed for the
|
chains. Determine the number of descriptors needed for the
|
||||||
|
@ -611,7 +611,7 @@ static err_t lpc_low_level_output(struct netif *netif, struct pbuf *p)
|
||||||
/* Wait until enough descriptors are available for the transfer. */
|
/* Wait until enough descriptors are available for the transfer. */
|
||||||
/* THIS WILL BLOCK UNTIL THERE ARE ENOUGH DESCRIPTORS AVAILABLE */
|
/* THIS WILL BLOCK UNTIL THERE ARE ENOUGH DESCRIPTORS AVAILABLE */
|
||||||
#if NO_SYS == 0
|
#if NO_SYS == 0
|
||||||
for (count = 0; count < dn; count++) {
|
for (s32_t count = 0; count < dn; count++) {
|
||||||
osSemaphoreAcquire(lpc_enetif->xTXDCountSem.id, osWaitForever);
|
osSemaphoreAcquire(lpc_enetif->xTXDCountSem.id, osWaitForever);
|
||||||
}
|
}
|
||||||
MBED_ASSERT(dn <= lpc_tx_ready(netif));
|
MBED_ASSERT(dn <= lpc_tx_ready(netif));
|
||||||
|
|
Loading…
Reference in New Issue