Code style fixes

This commit is contained in:
adamdunkels 2009-05-06 15:03:49 +00:00
parent 53a0c0a300
commit 381beac299

View file

@ -28,7 +28,7 @@
* *
* This file is part of the Contiki operating system. * This file is part of the Contiki operating system.
* *
* $Id: example-runicast.c,v 1.4 2009/03/12 21:58:21 adamdunkels Exp $ * $Id: example-runicast.c,v 1.5 2009/05/06 15:03:49 adamdunkels Exp $
*/ */
/** /**
@ -73,11 +73,11 @@ recv_runicast(struct runicast_conn *c, rimeaddr_t *from, uint8_t seqno)
/* OPTIONAL: Sender history */ /* OPTIONAL: Sender history */
struct history_entry *e = NULL; struct history_entry *e = NULL;
for(e = list_head(history_table); e != NULL; e = e->next) { for(e = list_head(history_table); e != NULL; e = e->next) {
if (rimeaddr_cmp(&e->addr, from)) { if(rimeaddr_cmp(&e->addr, from)) {
break; break;
} }
} }
if (e == NULL) { if(e == NULL) {
/* Create new history entry */ /* Create new history entry */
e = memb_alloc(&history_mem); e = memb_alloc(&history_mem);
if(e == NULL) { if(e == NULL) {
@ -88,7 +88,7 @@ recv_runicast(struct runicast_conn *c, rimeaddr_t *from, uint8_t seqno)
list_push(history_table, e); list_push(history_table, e);
} else { } else {
/* Detect duplicate callback */ /* Detect duplicate callback */
if (e->seq == seqno) { if(e->seq == seqno) {
printf("runicast message received from %d.%d, seqno %d (DUPLICATE)\n", printf("runicast message received from %d.%d, seqno %d (DUPLICATE)\n",
from->u8[0], from->u8[1], seqno); from->u8[0], from->u8[1], seqno);
return; return;