From d79416eee6976f81af47da3968532b281b164408 Mon Sep 17 00:00:00 2001 From: goldsimon Date: Tue, 13 Mar 2018 20:49:15 +0100 Subject: [PATCH] lowpan6: move a function to delete one prototype --- src/netif/lowpan6.c | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/src/netif/lowpan6.c b/src/netif/lowpan6.c index 256e69e1..eb77673c 100644 --- a/src/netif/lowpan6.c +++ b/src/netif/lowpan6.c @@ -110,8 +110,6 @@ static const struct ieee_802154_addr ieee_802154_broadcast = {2, {0xff, 0xff}}; static struct ieee_802154_addr short_mac_addr = {2, {0, 0}}; #endif /* LWIP_6LOWPAN_INFER_SHORT_ADDRESS */ -static void dequeue_datagram(struct lowpan6_reass_helper *lrh, struct lowpan6_reass_helper *prev); - static void free_reass_datagram(struct lowpan6_reass_helper *lrh) { @@ -124,6 +122,21 @@ free_reass_datagram(struct lowpan6_reass_helper *lrh) mem_free(lrh); } +/** + * Removes a datagram from the reassembly queue. + **/ +static void +dequeue_datagram(struct lowpan6_reass_helper *lrh, struct lowpan6_reass_helper *prev) +{ + if (lowpan6_data.reass_list == lrh) { + lowpan6_data.reass_list = lowpan6_data.reass_list->next_packet; + } else { + /* it wasn't the first, so it must have a valid 'prev' */ + LWIP_ASSERT("sanity check linked list", prev != NULL); + prev->next_packet = lrh->next_packet; + } +} + /** * Periodic timer for 6LowPAN functions: * @@ -147,21 +160,6 @@ lowpan6_tmr(void) } } -/** - * Removes a datagram from the reassembly queue. - **/ -static void -dequeue_datagram(struct lowpan6_reass_helper *lrh, struct lowpan6_reass_helper *prev) -{ - if (lowpan6_data.reass_list == lrh) { - lowpan6_data.reass_list = lowpan6_data.reass_list->next_packet; - } else { - /* it wasn't the first, so it must have a valid 'prev' */ - LWIP_ASSERT("sanity check linked list", prev != NULL); - prev->next_packet = lrh->next_packet; - } -} - /** Write the IEEE 802.15.4 header that encapsulates the 6LoWPAN frame. * Src and dst PAN IDs are filled with the ID set by @ref lowpan6_set_pan_id. *