Make sure that there is one space between while and condition

This commit is contained in:
Gregory Nutt 2014-04-12 13:09:48 -06:00
parent 17702dbad2
commit bb851fc8b5
9 changed files with 18 additions and 13 deletions

View File

@ -969,7 +969,7 @@ int c3b_main(int argc, char *argv[])
ch = getchar();
}
while(execute(ch) == 0);
while (execute(ch) == 0);
return 0;
}

View File

@ -47,7 +47,7 @@
#define NTEST_ALLOCS 32
/* #define STOP_ON_ERRORS do{}while(0) */
/* #define STOP_ON_ERRORS do {} while (0) */
#define STOP_ON_ERRORS exit(1)
/* All other definitions derive from these two */

View File

@ -246,7 +246,7 @@ static int tcpecho_server(void)
maxi = 0; /* max index into client[] array */
while(!stop)
while (!stop)
{
nready = poll(client, maxi+1, TCPECHO_POLLTIMEOUT);

View File

@ -174,18 +174,22 @@ int uip_main(int argc, char *argv[])
struct dhcpc_state ds;
(void)dhcpc_request(handle, &ds);
uip_sethostaddr("eth1", &ds.ipaddr);
if (ds.netmask.s_addr != 0)
{
uip_setnetmask("eth0", &ds.netmask);
}
if (ds.default_router.s_addr != 0)
{
uip_setdraddr("eth0", &ds.default_router);
}
if (ds.dnsaddr.s_addr != 0)
{
dns_setserver(&ds.dnsaddr);
}
dhcpc_close(handle);
printf("IP: %s\n", inet_ntoa(ds.ipaddr));
}
@ -198,7 +202,7 @@ int uip_main(int argc, char *argv[])
httpd_listen();
#endif
while(1)
while (1)
{
sleep(3);
printf("uip_main: Still running\n");
@ -206,5 +210,6 @@ int uip_main(int argc, char *argv[])
fflush(stdout);
#endif
}
return 0;
}

View File

@ -188,13 +188,13 @@ static FAR unsigned char *dns_parse_name(FAR unsigned char *query)
{
n = *query++;
while(n > 0)
while (n > 0)
{
++query;
--n;
}
}
while(*query != 0);
while (*query != 0);
return query + 1;
}
@ -247,7 +247,7 @@ static int dns_send_query(int sockfd, FAR const char *name,
*nptr = n;
}
while(*nameptr != 0);
while (*nameptr != 0);
memcpy(query, endquery, 5);

View File

@ -426,7 +426,6 @@ int ftpc_xfrabort(FAR struct ftpc_session_s *session, FAR FILE *stream)
/* Read remaining bytes from connection */
while (stream && fread(session->buffer, 1, CONFIG_FTP_BUFSIZE, stream) > 0);
while(stream && fread(session->buffer, 1, CONFIG_FTP_BUFSIZE, stream) > 0)
/* Get the ABORt reply */

View File

@ -92,8 +92,9 @@ bool uiplib_ipaddrconv(const char *addrstr, uint8_t *ipaddr)
}
++addrstr;
}
while(c != '.' && c != 0);
while (c != '.' && c != 0);
}
return true;
}
@ -149,7 +150,7 @@ bool uiplib_hwmacconv(const char *hwstr, uint8_t *hw)
++hwstr;
}
while(c != ':' && c != 0);
while (c != ':' && c != 0);
}
return true;

View File

@ -338,7 +338,7 @@ static int cmd_codecs_proc(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv,
buff_len = calc_codec_buffsize(src_buff_len+2, mode);
buffer = malloc(buff_len);
while(true)
while (true)
{
memset(src_buffer, 0, src_buff_len+2);
ret=read(fd, src_buffer, src_buff_len);

View File

@ -174,7 +174,7 @@ static int install_programflash(int startaddr, const char *source)
startaddr += count;
totalsize += count;
}
while(count);
while (count);
}
else
{
@ -308,7 +308,7 @@ static int install_remove(const char *scriptname)
progsize -= up_progmem_pagesize(page);
}
while(progsize > 0);
while (progsize > 0);
if (status < 0)
{