From 23b40f29340cb8f3210498962f1c846e313c9a19 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sat, 12 Apr 2014 13:09:48 -0600 Subject: [PATCH] Make sure that there is one space between while and condition --- configs/compal_e99/src/ssd1783.c | 2 +- configs/skp16c26/src/up_lcd.c | 2 +- configs/us7032evb1/shterm/shterm.c | 6 +++--- configs/vsn/src/sif.c | 7 ++++--- configs/vsn/src/spi.c | 8 +++++--- 5 files changed, 14 insertions(+), 11 deletions(-) diff --git a/configs/compal_e99/src/ssd1783.c b/configs/compal_e99/src/ssd1783.c index 70155ce243..ac7f8b13cb 100644 --- a/configs/compal_e99/src/ssd1783.c +++ b/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/configs/skp16c26/src/up_lcd.c b/configs/skp16c26/src/up_lcd.c index 11b176ee42..440be0d591 100644 --- a/configs/skp16c26/src/up_lcd.c +++ b/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/configs/us7032evb1/shterm/shterm.c b/configs/us7032evb1/shterm/shterm.c index 9eaa88c341..38840bab68 100644 --- a/configs/us7032evb1/shterm/shterm.c +++ b/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/configs/vsn/src/sif.c b/configs/vsn/src/sif.c index 6fa0be5a20..971c5ca867 100644 --- a/configs/vsn/src/sif.c +++ b/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/configs/vsn/src/spi.c b/configs/vsn/src/spi.c index c0363063f9..1738579483 100644 --- a/configs/vsn/src/spi.c +++ b/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(); + } } }