From f7c41cfe8e98cf3e2421e2e546b5fbac2d573590 Mon Sep 17 00:00:00 2001 From: Martin Date: Tue, 24 Sep 2013 07:35:50 +0200 Subject: [PATCH] applied coding convention and changed error printout to DEBUG(...) --- sys/net/sixlowpan/lowpan.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/sys/net/sixlowpan/lowpan.c b/sys/net/sixlowpan/lowpan.c index 5716645103..a54d567101 100644 --- a/sys/net/sixlowpan/lowpan.c +++ b/sys/net/sixlowpan/lowpan.c @@ -780,15 +780,14 @@ void lowpan_read(uint8_t *data, uint8_t length, ieee_802154_long_t *s_laddr, else { lowpan_reas_buf_t *current_buf = get_packet_frag_buf(length, 0, s_laddr, d_laddr); - if(current_buf != NULL) - { + if (current_buf && current_buf->packet) { /* Copy packet bytes into corresponding packet space area */ memcpy(current_buf->packet, data, length); current_buf->current_packet_size += length; add_fifo_packet(current_buf); - }else - { - printf("ERROR: no memory left in packet buffer!\n"); + } + else { + DEBUG("ERROR: no memory left in packet buffer!\n"); } if (thread_getstatus(transfer_pid) == STATUS_SLEEPING) { thread_wakeup(transfer_pid);