Fixed conformance to Contiki code style :)

This commit is contained in:
adamdunkels 2009-02-04 20:55:41 +00:00
parent 9689a579be
commit 96882c402a

View file

@ -119,7 +119,9 @@ static void
write_word(int fd, uint16_t w) write_word(int fd, uint16_t w)
{ {
word_union_t tmp; word_union_t tmp;
tmp.u16 = w; write_byte(fd, tmp.u8[0]); write_byte(fd, tmp.u8[1]); tmp.u16 = w;
write_byte(fd, tmp.u8[0]);
write_byte(fd, tmp.u8[1]);
} }
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
static uint8_t static uint8_t
@ -156,7 +158,8 @@ static uint16_t
read_word(int fd) read_word(int fd)
{ {
word_union_t tmp; word_union_t tmp;
tmp.u8[0] = read_byte(fd); tmp.u8[1] = read_byte(fd); tmp.u8[0] = read_byte(fd);
tmp.u8[1] = read_byte(fd);
return tmp.u16; return tmp.u16;
} }
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
@ -177,7 +180,9 @@ thread_checkpoint(int fd)
/* RAM */ /* RAM */
#if INCLUDE_RAM #if INCLUDE_RAM
for (addr = (unsigned char*) RAM_START; addr < (unsigned char*) RAM_END; addr++) { for(addr = (unsigned char *)RAM_START;
addr < (unsigned char *)RAM_END;
addr++) {
if((addr >= thread_mem_start && addr <= thread_mem_end)) { if((addr >= thread_mem_start && addr <= thread_mem_end)) {
/* Writing dummy memory */ /* Writing dummy memory */
@ -194,7 +199,9 @@ thread_checkpoint(int fd)
/* TODO Use write_array() */ /* TODO Use write_array() */
write_byte(fd, *addr); write_byte(fd, *addr);
if (((int)addr % 512) == 0) PRINTF("."); if(((int)addr % 512) == 0) {
PRINTF(".");
}
} }
#endif /* INCLUDE_RAM */ #endif /* INCLUDE_RAM */
@ -241,7 +248,9 @@ thread_rollback(int fd)
/* RAM */ /* RAM */
#if INCLUDE_RAM #if INCLUDE_RAM
for (addr = (unsigned char*) RAM_START; addr < (unsigned char*) RAM_END; addr++) { for(addr = (unsigned char *)RAM_START;
addr < (unsigned char *)RAM_END;
addr++) {
if((addr >= thread_mem_start && addr <= thread_mem_end)) { if((addr >= thread_mem_start && addr <= thread_mem_end)) {
/* Ignoring incoming memory */ /* Ignoring incoming memory */
/*read_byte(fd);*/ /*read_byte(fd);*/
@ -256,7 +265,9 @@ thread_rollback(int fd)
*addr = read_byte(fd); *addr = read_byte(fd);
if (((int)addr % 512) == 0) PRINTF("."); if(((int)addr % 512) == 0) {
PRINTF(".");
}
} }
#endif /* INCLUDE_RAM */ #endif /* INCLUDE_RAM */
@ -358,3 +369,4 @@ checkpoint_arch_init(void)
/*mt_stop(&checkpoint_thread);*/ /*mt_stop(&checkpoint_thread);*/
/*mt_remove();*/ /*mt_remove();*/
} }
/*---------------------------------------------------------------------------*/