summaryrefslogtreecommitdiff
path: root/nuttx
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-04-12 13:09:48 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-04-12 13:09:48 -0600
commit5d99549aca261d40abf3e0d7180c2bddca3522b3 (patch)
tree8602dccf7672ec2af9de95c9b005fea2e9a37243 /nuttx
parent5fbbc21f13770cc35c3e61e3109c125d03f172eb (diff)
downloadnuttx-5d99549aca261d40abf3e0d7180c2bddca3522b3.tar.gz
nuttx-5d99549aca261d40abf3e0d7180c2bddca3522b3.tar.bz2
nuttx-5d99549aca261d40abf3e0d7180c2bddca3522b3.zip
Make sure that there is one space between while and condition
Diffstat (limited to 'nuttx')
-rw-r--r--nuttx/arch/arm/src/common/up_lowputs.c2
-rw-r--r--nuttx/arch/arm/src/sama5/sam_nand.c2
-rw-r--r--nuttx/arch/arm/src/stm32/stm32_flash.c4
-rw-r--r--nuttx/arch/arm/src/stm32/stm32_pwr.c4
-rw-r--r--nuttx/arch/arm/src/stm32/stm32f10xxx_rcc.c2
-rw-r--r--nuttx/arch/arm/src/stm32/stm32f30xxx_rcc.c2
-rw-r--r--nuttx/arch/arm/src/stm32/stm32f40xxx_rcc.c4
-rw-r--r--nuttx/arch/arm/src/tiva/tiva_flash.c2
-rw-r--r--nuttx/arch/avr/src/common/up_lowputs.c2
-rw-r--r--nuttx/arch/avr/src/common/up_puts.c2
-rw-r--r--nuttx/arch/hc/src/common/up_puts.c2
-rw-r--r--nuttx/arch/mips/src/common/up_lowputs.c2
-rw-r--r--nuttx/arch/mips/src/common/up_puts.c2
-rw-r--r--nuttx/arch/mips/src/pic32mx/pic32mx-lowinit.c3
-rw-r--r--nuttx/arch/rgmp/src/rgmp.c7
-rw-r--r--nuttx/arch/sh/src/common/up_lowputs.c2
-rw-r--r--nuttx/arch/sh/src/common/up_puts.c2
-rw-r--r--nuttx/arch/x86/src/common/up_lowputs.c2
-rw-r--r--nuttx/arch/x86/src/common/up_puts.c2
-rw-r--r--nuttx/configs/compal_e99/src/ssd1783.c2
-rw-r--r--nuttx/configs/skp16c26/src/up_lcd.c2
-rw-r--r--nuttx/configs/us7032evb1/shterm/shterm.c6
-rw-r--r--nuttx/configs/vsn/src/sif.c7
-rw-r--r--nuttx/configs/vsn/src/spi.c8
-rw-r--r--nuttx/drivers/mmcsd/mmcsd_sdio.c2
-rw-r--r--nuttx/drivers/mtd/mtd_onfi.c2
-rw-r--r--nuttx/drivers/wireless/cc3000/cc3000.c4
-rw-r--r--nuttx/drivers/wireless/cc3000/cc3000drv.c2
-rw-r--r--nuttx/drivers/wireless/cc3000/evnt_handler.c4
-rw-r--r--nuttx/drivers/wireless/nrf24l01.c4
-rw-r--r--nuttx/fs/fs_inodereserve.c4
-rw-r--r--nuttx/include/nuttx/net/uip/uip-tcp.h2
-rw-r--r--nuttx/include/nuttx/net/uip/uip.h10
-rw-r--r--nuttx/net/uip/uip_chksum.c2
-rw-r--r--nuttx/sched/wd_cancel.c2
35 files changed, 59 insertions, 54 deletions
diff --git a/nuttx/arch/arm/src/common/up_lowputs.c b/nuttx/arch/arm/src/common/up_lowputs.c
index 890167e0e..b3234637f 100644
--- a/nuttx/arch/arm/src/common/up_lowputs.c
+++ b/nuttx/arch/arm/src/common/up_lowputs.c
@@ -67,7 +67,7 @@
void up_lowputs(const char *str)
{
- while(*str)
+ while (*str)
{
up_lowputc(*str++);
}
diff --git a/nuttx/arch/arm/src/sama5/sam_nand.c b/nuttx/arch/arm/src/sama5/sam_nand.c
index 3f1a041ef..9e4bf0e8b 100644
--- a/nuttx/arch/arm/src/sama5/sam_nand.c
+++ b/nuttx/arch/arm/src/sama5/sam_nand.c
@@ -1738,7 +1738,7 @@ static int nand_read_pmecc(struct sam_nandcs_s *priv, off_t block,
/* Wait until the kernel of the PMECC is not busy */
- while((nand_getreg(SAM_HSMC_PMECCSR) & HSMC_PMECCSR_BUSY) != 0);
+ while ((nand_getreg(SAM_HSMC_PMECCSR) & HSMC_PMECCSR_BUSY) != 0);
return OK;
}
#endif
diff --git a/nuttx/arch/arm/src/stm32/stm32_flash.c b/nuttx/arch/arm/src/stm32/stm32_flash.c
index 20b0cfe10..f725fb7f7 100644
--- a/nuttx/arch/arm/src/stm32/stm32_flash.c
+++ b/nuttx/arch/arm/src/stm32/stm32_flash.c
@@ -148,7 +148,7 @@ int up_progmem_erasepage(uint16_t page)
putreg32(page * STM32_FLASH_PAGESIZE, STM32_FLASH_AR);
modifyreg32(STM32_FLASH_CR, 0, FLASH_CR_STRT);
- while(getreg32(STM32_FLASH_SR) & FLASH_SR_BSY) up_waste();
+ while (getreg32(STM32_FLASH_SR) & FLASH_SR_BSY) up_waste();
modifyreg32(STM32_FLASH_CR, FLASH_CR_PER, 0);
@@ -232,7 +232,7 @@ int up_progmem_write(uint32_t addr, const void *buf, size_t count)
putreg16(*hword, addr);
- while(getreg32(STM32_FLASH_SR) & FLASH_SR_BSY) up_waste();
+ while (getreg32(STM32_FLASH_SR) & FLASH_SR_BSY) up_waste();
/* Verify */
diff --git a/nuttx/arch/arm/src/stm32/stm32_pwr.c b/nuttx/arch/arm/src/stm32/stm32_pwr.c
index 1c9513541..21a397599 100644
--- a/nuttx/arch/arm/src/stm32/stm32_pwr.c
+++ b/nuttx/arch/arm/src/stm32/stm32_pwr.c
@@ -129,14 +129,14 @@ void stm32_pwr_setvos(uint16_t vos)
* 4. Poll VOSF bit of in PWR_CSR register. Wait until it is reset to 0.
*/
- while((stm32_pwr_getreg(STM32_PWR_CSR_OFFSET) & PWR_CSR_VOSF) != 0);
+ while ((stm32_pwr_getreg(STM32_PWR_CSR_OFFSET) & PWR_CSR_VOSF) != 0);
regval = stm32_pwr_getreg(STM32_PWR_CR_OFFSET);
regval &= ~PWR_CR_VOS_MASK;
regval |= (vos & PWR_CR_VOS_MASK);
stm32_pwr_putreg(STM32_PWR_CR_OFFSET, regval);
- while((stm32_pwr_getreg(STM32_PWR_CSR_OFFSET) & PWR_CSR_VOSF) != 0);
+ while ((stm32_pwr_getreg(STM32_PWR_CSR_OFFSET) & PWR_CSR_VOSF) != 0);
}
#endif
diff --git a/nuttx/arch/arm/src/stm32/stm32f10xxx_rcc.c b/nuttx/arch/arm/src/stm32/stm32f10xxx_rcc.c
index f887f8995..f46f0d104 100644
--- a/nuttx/arch/arm/src/stm32/stm32f10xxx_rcc.c
+++ b/nuttx/arch/arm/src/stm32/stm32f10xxx_rcc.c
@@ -548,7 +548,7 @@ static void stm32_stdclockconfig(void)
/* Wait for PLL2 ready */
- while((getreg32(STM32_RCC_CR) & RCC_CR_PLL2RDY) == 0);
+ while ((getreg32(STM32_RCC_CR) & RCC_CR_PLL2RDY) == 0);
/* Setup PLL3 for MII/RMII clock on MCO */
diff --git a/nuttx/arch/arm/src/stm32/stm32f30xxx_rcc.c b/nuttx/arch/arm/src/stm32/stm32f30xxx_rcc.c
index c18f1de3e..1209013d8 100644
--- a/nuttx/arch/arm/src/stm32/stm32f30xxx_rcc.c
+++ b/nuttx/arch/arm/src/stm32/stm32f30xxx_rcc.c
@@ -457,7 +457,7 @@ static void stm32_stdclockconfig(void)
/* Wait for PLL2 ready */
- while((getreg32(STM32_RCC_CR) & RCC_CR_PLL2RDY) == 0);
+ while ((getreg32(STM32_RCC_CR) & RCC_CR_PLL2RDY) == 0);
/* Setup PLL3 for MII/RMII clock on MCO */
diff --git a/nuttx/arch/arm/src/stm32/stm32f40xxx_rcc.c b/nuttx/arch/arm/src/stm32/stm32f40xxx_rcc.c
index bba3c2142..4c74fa912 100644
--- a/nuttx/arch/arm/src/stm32/stm32f40xxx_rcc.c
+++ b/nuttx/arch/arm/src/stm32/stm32f40xxx_rcc.c
@@ -686,14 +686,14 @@ static void stm32_stdclockconfig(void)
regval = getreg32(STM32_PWR_CR);
regval |= PWR_CR_ODEN;
putreg32(regval, STM32_PWR_CR);
- while((getreg32(STM32_PWR_CSR) & PWR_CSR_ODRDY) == 0)
+ while ((getreg32(STM32_PWR_CSR) & PWR_CSR_ODRDY) == 0)
{
}
regval = getreg32(STM32_PWR_CR);
regval |= PWR_CR_ODSWEN;
putreg32(regval, STM32_PWR_CR);
- while((getreg32(STM32_PWR_CSR) & PWR_CSR_ODSWRDY) == 0)
+ while ((getreg32(STM32_PWR_CSR) & PWR_CSR_ODSWRDY) == 0)
{
}
diff --git a/nuttx/arch/arm/src/tiva/tiva_flash.c b/nuttx/arch/arm/src/tiva/tiva_flash.c
index 154617fd6..fe463222c 100644
--- a/nuttx/arch/arm/src/tiva/tiva_flash.c
+++ b/nuttx/arch/arm/src/tiva/tiva_flash.c
@@ -217,7 +217,7 @@ static ssize_t tiva_bwrite(FAR struct mtd_dev_s *dev, off_t startblock, size_t n
/* wait until write has finished */
- while(getreg32(TIVA_FLASH_FMC) & FLASH_FMC_WRITE);
+ while (getreg32(TIVA_FLASH_FMC) & FLASH_FMC_WRITE);
}
return nblocks;
diff --git a/nuttx/arch/avr/src/common/up_lowputs.c b/nuttx/arch/avr/src/common/up_lowputs.c
index 5e57ac726..de4b4ff16 100644
--- a/nuttx/arch/avr/src/common/up_lowputs.c
+++ b/nuttx/arch/avr/src/common/up_lowputs.c
@@ -67,7 +67,7 @@
void up_lowputs(const char *str)
{
- while(*str)
+ while (*str)
{
up_lowputc(*str++);
}
diff --git a/nuttx/arch/avr/src/common/up_puts.c b/nuttx/arch/avr/src/common/up_puts.c
index c7cde66a2..e9b4171b9 100644
--- a/nuttx/arch/avr/src/common/up_puts.c
+++ b/nuttx/arch/avr/src/common/up_puts.c
@@ -68,7 +68,7 @@
void up_puts(const char *str)
{
- while(*str)
+ while (*str)
{
up_putc(*str++);
}
diff --git a/nuttx/arch/hc/src/common/up_puts.c b/nuttx/arch/hc/src/common/up_puts.c
index 68ad38670..5c888ef16 100644
--- a/nuttx/arch/hc/src/common/up_puts.c
+++ b/nuttx/arch/hc/src/common/up_puts.c
@@ -69,7 +69,7 @@
void up_puts(const char *str)
{
- while(*str)
+ while (*str)
{
up_putc(*str++);
}
diff --git a/nuttx/arch/mips/src/common/up_lowputs.c b/nuttx/arch/mips/src/common/up_lowputs.c
index 314e239b1..396edeb1b 100644
--- a/nuttx/arch/mips/src/common/up_lowputs.c
+++ b/nuttx/arch/mips/src/common/up_lowputs.c
@@ -67,7 +67,7 @@
void up_lowputs(const char *str)
{
- while(*str)
+ while (*str)
{
up_lowputc(*str++);
}
diff --git a/nuttx/arch/mips/src/common/up_puts.c b/nuttx/arch/mips/src/common/up_puts.c
index 2394343f9..1b9f31f84 100644
--- a/nuttx/arch/mips/src/common/up_puts.c
+++ b/nuttx/arch/mips/src/common/up_puts.c
@@ -68,7 +68,7 @@
void up_puts(const char *str)
{
- while(*str)
+ while (*str)
{
up_putc(*str++);
}
diff --git a/nuttx/arch/mips/src/pic32mx/pic32mx-lowinit.c b/nuttx/arch/mips/src/pic32mx/pic32mx-lowinit.c
index d6bc6a812..0eb34d0c9 100644
--- a/nuttx/arch/mips/src/pic32mx/pic32mx-lowinit.c
+++ b/nuttx/arch/mips/src/pic32mx/pic32mx-lowinit.c
@@ -125,11 +125,12 @@ static inline void pic32mx_waitstates(void)
residual = BOARD_CPU_CLOCK;
nwaits = 0;
- while(residual > MAX_FLASH_HZ)
+ while (residual > MAX_FLASH_HZ)
{
nwaits++;
residual -= MAX_FLASH_HZ;
}
+
DEBUGASSERT(nwaits < 8);
/* Set the FLASH wait states -- clearing all other bits! */
diff --git a/nuttx/arch/rgmp/src/rgmp.c b/nuttx/arch/rgmp/src/rgmp.c
index db5dd955e..e71782112 100644
--- a/nuttx/arch/rgmp/src/rgmp.c
+++ b/nuttx/arch/rgmp/src/rgmp.c
@@ -151,9 +151,10 @@ void rtos_stop_running(void)
nuttx_arch_exit();
- while(1) {
- arch_hlt();
- }
+ while (1)
+ {
+ arch_hlt();
+ }
}
int rtos_vnet_init(struct rgmp_vnet *vnet)
diff --git a/nuttx/arch/sh/src/common/up_lowputs.c b/nuttx/arch/sh/src/common/up_lowputs.c
index 88cc24068..627b22e0c 100644
--- a/nuttx/arch/sh/src/common/up_lowputs.c
+++ b/nuttx/arch/sh/src/common/up_lowputs.c
@@ -67,7 +67,7 @@
void up_lowputs(const char *str)
{
- while(*str)
+ while (*str)
{
up_lowputc(*str++);
}
diff --git a/nuttx/arch/sh/src/common/up_puts.c b/nuttx/arch/sh/src/common/up_puts.c
index e17338039..968e216d2 100644
--- a/nuttx/arch/sh/src/common/up_puts.c
+++ b/nuttx/arch/sh/src/common/up_puts.c
@@ -68,7 +68,7 @@
void up_puts(const char *str)
{
- while(*str)
+ while (*str)
{
up_putc(*str++);
}
diff --git a/nuttx/arch/x86/src/common/up_lowputs.c b/nuttx/arch/x86/src/common/up_lowputs.c
index b6ea96cc2..7a6313526 100644
--- a/nuttx/arch/x86/src/common/up_lowputs.c
+++ b/nuttx/arch/x86/src/common/up_lowputs.c
@@ -67,7 +67,7 @@
void up_lowputs(const char *str)
{
- while(*str)
+ while (*str)
{
up_lowputc(*str++);
}
diff --git a/nuttx/arch/x86/src/common/up_puts.c b/nuttx/arch/x86/src/common/up_puts.c
index c4df9ad71..047802b6a 100644
--- a/nuttx/arch/x86/src/common/up_puts.c
+++ b/nuttx/arch/x86/src/common/up_puts.c
@@ -68,7 +68,7 @@
void up_puts(const char *str)
{
- while(*str)
+ while (*str)
{
up_putc(*str++);
}
diff --git a/nuttx/configs/compal_e99/src/ssd1783.c b/nuttx/configs/compal_e99/src/ssd1783.c
index 70155ce24..ac7f8b13c 100644
--- a/nuttx/configs/compal_e99/src/ssd1783.c
+++ b/nuttx/configs/compal_e99/src/ssd1783.c
@@ -203,7 +203,7 @@ static void fb_ssd1783_send_cmdlist(const struct ssd1783_cmdlist *p)
{
int i=0;
- while(p->is_cmd != END)
+ while (p->is_cmd != END)
{
uint16_t sendcmd = p->data;
if (p->is_cmd == DATA)
diff --git a/nuttx/configs/skp16c26/src/up_lcd.c b/nuttx/configs/skp16c26/src/up_lcd.c
index 11b176ee4..440be0d59 100644
--- a/nuttx/configs/skp16c26/src/up_lcd.c
+++ b/nuttx/configs/skp16c26/src/up_lcd.c
@@ -93,7 +93,7 @@ static uint8_t g_line[LCD_NCHARS]; /* The content of lines 2 */
static void up_lcddelay(uint16_t count)
{
uint32_t counter = (uint16_t)count << 8;
- while(counter--)
+ while (counter--)
{
asm("\tnop\n\tnop\n\tnop\n" : :); /* 3 NOPs */
}
diff --git a/nuttx/configs/us7032evb1/shterm/shterm.c b/nuttx/configs/us7032evb1/shterm/shterm.c
index 9eaa88c34..38840bab6 100644
--- a/nuttx/configs/us7032evb1/shterm/shterm.c
+++ b/nuttx/configs/us7032evb1/shterm/shterm.c
@@ -357,11 +357,11 @@ static void getfilename(int fd, char *name)
{
ret = readbyte(fd, &ch);
}
- while(ch == ' ' && ret == 1);
+ while (ch == ' ' && ret == 1);
/* Concatenate the filename */
- while(ret == 1 && ch > ' ')
+ while (ret == 1 && ch > ' ')
{
*name++ = ch;
ret = readbyte(fd, &ch);
@@ -484,7 +484,7 @@ int main(int argc, char **argv, char **envp)
int oflags;
int ret;
- while((opt = getopt(argc, argv, ":dt:b:hl:")) != -1)
+ while ((opt = getopt(argc, argv, ":dt:b:hl:")) != -1)
{
switch(opt)
{
diff --git a/nuttx/configs/vsn/src/sif.c b/nuttx/configs/vsn/src/sif.c
index 6fa0be5a2..971c5ca86 100644
--- a/nuttx/configs/vsn/src/sif.c
+++ b/nuttx/configs/vsn/src/sif.c
@@ -204,9 +204,10 @@ struct vsn_sif_s vsn_sif;
void sif_sem_wait(void)
{
- while( sem_wait( &vsn_sif.exclusive_access ) != 0 ) {
+ while (sem_wait( &vsn_sif.exclusive_access ) != 0)
+ {
ASSERT(errno == EINTR);
- }
+ }
}
@@ -688,7 +689,7 @@ int sif_main(int argc, char *argv[])
cc1101_setchannel(cc, 0); /* AV Test Hex, receive on that channel */
cc1101_receive(cc); /* Enter RX mode */
- while(1)
+ while (1)
{
fflush(stdout);
sta = cc1101_read(cc, buf, 64);
diff --git a/nuttx/configs/vsn/src/spi.c b/nuttx/configs/vsn/src/spi.c
index c0363063f..173857948 100644
--- a/nuttx/configs/vsn/src/spi.c
+++ b/nuttx/configs/vsn/src/spi.c
@@ -157,9 +157,11 @@ void stm32_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool sele
stm32_gpiowrite(GPIO_CC1101_CS, !selected);
/* Wait for MISO to go low, indicates that Quart has stabilized */
- if (selected) {
- while( stm32_gpioread(GPIO_SPI2_MISO) ) up_waste();
- }
+
+ if (selected)
+ {
+ while (stm32_gpioread(GPIO_SPI2_MISO) ) up_waste();
+ }
}
}
diff --git a/nuttx/drivers/mmcsd/mmcsd_sdio.c b/nuttx/drivers/mmcsd/mmcsd_sdio.c
index b0968cdd7..e4462c749 100644
--- a/nuttx/drivers/mmcsd/mmcsd_sdio.c
+++ b/nuttx/drivers/mmcsd/mmcsd_sdio.c
@@ -2909,7 +2909,7 @@ static int mmcsd_cardidentify(FAR struct mmcsd_state_s *priv)
elapsed = clock_systimer() - start;
}
- while( elapsed < TICK_PER_SEC ); /* On successful reception while 'breaks', see above. */
+ while (elapsed < TICK_PER_SEC); /* On successful reception while 'breaks', see above. */
/* We get here when the above loop completes, either (1) we could not
* communicate properly with the card due to errors (and the loop times
diff --git a/nuttx/drivers/mtd/mtd_onfi.c b/nuttx/drivers/mtd/mtd_onfi.c
index c5df8c3b6..5f9781b29 100644
--- a/nuttx/drivers/mtd/mtd_onfi.c
+++ b/nuttx/drivers/mtd/mtd_onfi.c
@@ -111,7 +111,7 @@
#define WRITE_NAND(d,a) \
do { \
*(volatile uint8_t *)((uintptr_t)a) = (uint8_t)d; \
- } while(0)
+ } while (0)
/****************************************************************************
* Private Types
diff --git a/nuttx/drivers/wireless/cc3000/cc3000.c b/nuttx/drivers/wireless/cc3000/cc3000.c
index 674be5c28..86ac378ab 100644
--- a/nuttx/drivers/wireless/cc3000/cc3000.c
+++ b/nuttx/drivers/wireless/cc3000/cc3000.c
@@ -626,7 +626,7 @@ static void * cc3000_worker(FAR void *arg)
/* We have started release our creator*/
sem_post(&priv->readysem);
- while(1)
+ while (1)
{
PROBE(0,1);
CHECK_GUARD(priv);
@@ -741,7 +741,7 @@ static void * cc3000_worker(FAR void *arg)
} /* end if */
cc3000_devgive(priv);
- } /* while(1) */
+ } /* while (1) */
return OK;
}
diff --git a/nuttx/drivers/wireless/cc3000/cc3000drv.c b/nuttx/drivers/wireless/cc3000/cc3000drv.c
index b98dc0261..f0ade37d1 100644
--- a/nuttx/drivers/wireless/cc3000/cc3000drv.c
+++ b/nuttx/drivers/wireless/cc3000/cc3000drv.c
@@ -209,7 +209,7 @@ static void *unsoliced_thread_func(void *parameter)
spiconf.done = sem_open(buff,O_RDONLY);
DEBUGASSERT(spiconf.done != (sem_t *)-1);
- while(spiconf.run)
+ while (spiconf.run)
{
memset(&spiconf.rx_buffer,0,sizeof(spiconf.rx_buffer));
nbytes = mq_receive(spiconf.queue, &spiconf.rx_buffer,
diff --git a/nuttx/drivers/wireless/cc3000/evnt_handler.c b/nuttx/drivers/wireless/cc3000/evnt_handler.c
index 14f926c46..82c2f85d3 100644
--- a/nuttx/drivers/wireless/cc3000/evnt_handler.c
+++ b/nuttx/drivers/wireless/cc3000/evnt_handler.c
@@ -938,7 +938,7 @@ void SimpleLinkWaitEvent(uint16_t usOpcode, void *pRetParams)
hci_event_handler(pRetParams, 0, 0);
}
}
- while(tSLInformation.usRxEventOpcode != 0);
+ while (tSLInformation.usRxEventOpcode != 0);
nllvdbg("Done for usOpcode 0x%x\n",usOpcode);
}
@@ -996,7 +996,7 @@ void SimpleLinkWaitData(uint8_t *pBuf, uint8_t *from, uint8_t *fromlen)
}
}
}
- while(*tSLInformation.pucReceivedData == HCI_TYPE_EVNT);
+ while (*tSLInformation.pucReceivedData == HCI_TYPE_EVNT);
nllvdbg("Done for Data 0x%x\n",usOpcode);
}
diff --git a/nuttx/drivers/wireless/nrf24l01.c b/nuttx/drivers/wireless/nrf24l01.c
index abb71e725..71c3cb5ab 100644
--- a/nuttx/drivers/wireless/nrf24l01.c
+++ b/nuttx/drivers/wireless/nrf24l01.c
@@ -82,7 +82,7 @@
#endif
#ifdef CONFIG_WL_NRF24L01_CHECK_PARAMS
-# define CHECK_ARGS(cond) do { if (!(cond)) return -EINVAL; } while(0)
+# define CHECK_ARGS(cond) do { if (!(cond)) return -EINVAL; } while (0)
#else
# define CHECK_ARGS(cond)
#endif
@@ -1719,7 +1719,7 @@ ssize_t nrf24l01_recv(struct nrf24l01_dev_s *dev, uint8_t *buffer,
static void binarycvt(char *deststr, const uint8_t *srcbin, size_t srclen)
{
int i = 0;
- while(i < srclen)
+ while (i < srclen)
{
sprintf(deststr + i*2, "%02x", srcbin[i]);
++i;
diff --git a/nuttx/fs/fs_inodereserve.c b/nuttx/fs/fs_inodereserve.c
index ad3a8107e..82d3e6f2d 100644
--- a/nuttx/fs/fs_inodereserve.c
+++ b/nuttx/fs/fs_inodereserve.c
@@ -70,7 +70,7 @@
static int inode_namelen(FAR const char *name)
{
const char *tmp = name;
- while(*tmp && *tmp != '/') tmp++;
+ while (*tmp && *tmp != '/') tmp++;
return tmp - name;
}
@@ -80,7 +80,7 @@ static int inode_namelen(FAR const char *name)
static void inode_namecpy(char *dest, const char *src)
{
- while(*src && *src != '/') *dest++ = *src++;
+ while (*src && *src != '/') *dest++ = *src++;
*dest='\0';
}
diff --git a/nuttx/include/nuttx/net/uip/uip-tcp.h b/nuttx/include/nuttx/net/uip/uip-tcp.h
index 001ae088e..fd07e333b 100644
--- a/nuttx/include/nuttx/net/uip/uip-tcp.h
+++ b/nuttx/include/nuttx/net/uip/uip-tcp.h
@@ -495,7 +495,7 @@ int uip_backlogdelete(FAR struct uip_conn *conn, FAR struct uip_conn *blconn);
do { \
(f) |= UIP_NEWDATA; \
(conn)->tcpstateflags &= ~UIP_STOPPED; \
- } while(0)
+ } while (0)
/* Get the current maximum segment size that can be sent on the current
* connection.
diff --git a/nuttx/include/nuttx/net/uip/uip.h b/nuttx/include/nuttx/net/uip/uip.h
index 624bfae4a..c9078fd9e 100644
--- a/nuttx/include/nuttx/net/uip/uip.h
+++ b/nuttx/include/nuttx/net/uip/uip.h
@@ -411,7 +411,7 @@ extern void uip_send(struct uip_driver_s *dev, const void *buf, int len);
do { \
addr = HTONL((uint32_t)(addr0) << 24 | (uint32_t)(addr1) << 16 | \
(uint32_t)(addr2) << 8 | (uint32_t)(addr3)); \
- } while(0)
+ } while (0)
/* Convert an IPv4 address of the form uint16_t[2] to an in_addr_t */
@@ -454,7 +454,7 @@ extern void uip_send(struct uip_driver_s *dev, const void *buf, int len);
((uint16_t*)(addr))[5] = HTONS((addr5)); \
((uint16_t*)(addr))[6] = HTONS((addr6)); \
((uint16_t*)(addr))[7] = HTONS((addr7)); \
- } while(0)
+ } while (0)
/* Copy an IP address to another IP address.
*
@@ -475,12 +475,12 @@ extern void uip_send(struct uip_driver_s *dev, const void *buf, int len);
# define uip_ipaddr_copy(dest, src) \
do { \
(dest) = (in_addr_t)(src); \
- } while(0)
+ } while (0)
# define uiphdr_ipaddr_copy(dest, src) \
do { \
((uint16_t*)(dest))[0] = ((uint16_t*)(src))[0]; \
((uint16_t*)(dest))[1] = ((uint16_t*)(src))[1]; \
- } while(0)
+ } while (0)
#else /* !CONFIG_NET_IPv6 */
# define uip_ipaddr_copy(dest, src) memcpy(&dest, &src, sizeof(uip_ip6addr_t))
# define uiphdr_ipaddr_copy(dest, src) uip_ipaddr_copy(dest, src)
@@ -565,6 +565,6 @@ extern bool uip_ipaddr_maskcmp(uip_ipaddr_t addr1, uip_ipaddr_t addr2,
#define uip_ipaddr_mask(dest, src, mask) \
do { \
(in_addr_t)(dest) = (in_addr_t)(src) & (in_addr_t)(mask); \
- } while(0)
+ } while (0)
#endif /* __INCLUDE_NUTTX_NET_UIP_UIP_H */
diff --git a/nuttx/net/uip/uip_chksum.c b/nuttx/net/uip/uip_chksum.c
index edea6db65..9f4a89866 100644
--- a/nuttx/net/uip/uip_chksum.c
+++ b/nuttx/net/uip/uip_chksum.c
@@ -74,7 +74,7 @@ static uint16_t chksum(uint16_t sum, const uint8_t *data, uint16_t len)
dataptr = data;
last_byte = data + len - 1;
- while(dataptr < last_byte)
+ while (dataptr < last_byte)
{
/* At least two more bytes */
diff --git a/nuttx/sched/wd_cancel.c b/nuttx/sched/wd_cancel.c
index a1c220873..3a6e67eef 100644
--- a/nuttx/sched/wd_cancel.c
+++ b/nuttx/sched/wd_cancel.c
@@ -113,7 +113,7 @@ int wd_cancel (WDOG_ID wdid)
prev = NULL;
curr = (wdog_t*)g_wdactivelist.head;
- while((curr) && (curr != wdid))
+ while ((curr) && (curr != wdid))
{
prev = curr;
curr = curr->next;