diff --git a/drivers/wireless/ieee802154/mrf24j40/mrf24j40_interrupt.c b/drivers/wireless/ieee802154/mrf24j40/mrf24j40_interrupt.c index 007e60a9bd4..3bb937defea 100644 --- a/drivers/wireless/ieee802154/mrf24j40/mrf24j40_interrupt.c +++ b/drivers/wireless/ieee802154/mrf24j40/mrf24j40_interrupt.c @@ -231,10 +231,7 @@ static void mrf24j40_irqwork_rx(FAR struct mrf24j40_radio_s *dev) /* Allocate an IOB to put the frame into */ ind->frame = iob_alloc(false); - ind->frame->io_flink = NULL; - ind->frame->io_len = 0; - ind->frame->io_pktlen = 0; - ind->frame->io_offset = 0; + DEBUGASSERT(ind->frame != NULL); /* Read packet */ diff --git a/drivers/wireless/ieee802154/xbee/xbee.c b/drivers/wireless/ieee802154/xbee/xbee.c index 982887e8b7f..cde2506a189 100644 --- a/drivers/wireless/ieee802154/xbee/xbee.c +++ b/drivers/wireless/ieee802154/xbee/xbee.c @@ -163,11 +163,8 @@ static void xbee_attnworker(FAR void *arg) /* Allocate an IOB for the incoming data. */ - iob = iob_alloc(false); - iob->io_flink = NULL; - iob->io_len = 0; - iob->io_offset = 0; - iob->io_pktlen = 0; + iob = iob_alloc(false); + DEBUGASSERT(iob != NULL); /* Keep a reference to the first IOB. If we need to allocate more than * one to hold each API frame, then we will still have this reference to @@ -266,13 +263,6 @@ static void xbee_attnworker(FAR void *arg) iob->io_flink = iob_tryalloc(false); iob = iob->io_flink; - if (iob != NULL) - { - iob->io_flink = NULL; - iob->io_len = 0; - iob->io_offset = 0; - iob->io_pktlen = 0; - } } else { @@ -1324,11 +1314,8 @@ void xbee_send_apiframe(FAR struct xbee_priv_s *priv, * data. */ - iob = iob_tryalloc(false); - iob->io_flink = NULL; - iob->io_len = 0; - iob->io_offset = 0; - iob->io_pktlen = 0; + iob = iob_tryalloc(false); + DEBUGASSERT(iob != NULL); /* Keep a reference to the first IOB. If we need to allocate more than * one to hold each API frame, then we will still have this reference to @@ -1420,14 +1407,6 @@ void xbee_send_apiframe(FAR struct xbee_priv_s *priv, iob->io_flink = iob_tryalloc(false); iob = iob->io_flink; - - if (iob != NULL) - { - iob->io_flink = NULL; - iob->io_len = 0; - iob->io_offset = 0; - iob->io_pktlen = 0; - } } else { diff --git a/drivers/wireless/spirit/drivers/spirit_netdev.c b/drivers/wireless/spirit/drivers/spirit_netdev.c index 01245880825..ccc244d0f69 100644 --- a/drivers/wireless/spirit/drivers/spirit_netdev.c +++ b/drivers/wireless/spirit/drivers/spirit_netdev.c @@ -1198,14 +1198,6 @@ static void spirit_interrupt_work(FAR void *arg) { priv->rxbuffer = iob_alloc(false); } - - if (priv->rxbuffer != NULL) - { - priv->rxbuffer->io_len = 0; - priv->rxbuffer->io_offset = 0; - priv->rxbuffer->io_pktlen = 0; - priv->rxbuffer->io_flink = NULL; - } #endif } diff --git a/libs/libc/stream/lib_syslogstream.c b/libs/libc/stream/lib_syslogstream.c index fd0d8b5b311..0ee5f0a9f50 100644 --- a/libs/libc/stream/lib_syslogstream.c +++ b/libs/libc/stream/lib_syslogstream.c @@ -183,10 +183,6 @@ static void syslogstream_putc(FAR struct lib_outstream_s *this, int ch) void lib_syslogstream_open(FAR struct lib_syslogstream_s *stream) { -#ifdef CONFIG_SYSLOG_BUFFER - FAR struct iob_s *iob; -#endif - DEBUGASSERT(stream != NULL); /* Initialize the common fields */ @@ -198,17 +194,7 @@ void lib_syslogstream_open(FAR struct lib_syslogstream_s *stream) #ifdef CONFIG_SYSLOG_BUFFER /* Allocate an IOB */ - iob = iob_tryalloc(true); - stream->iob = iob; - - if (iob != NULL) - { - /* Initialize the IOB */ - - iob->io_len = 0; - iob->io_offset = 0; - iob->io_pktlen = 0; - } + stream->iob = iob_tryalloc(true); #endif } diff --git a/net/sixlowpan/sixlowpan_framelist.c b/net/sixlowpan/sixlowpan_framelist.c index 785dbbc8c27..83b3e90a192 100644 --- a/net/sixlowpan/sixlowpan_framelist.c +++ b/net/sixlowpan/sixlowpan_framelist.c @@ -413,13 +413,7 @@ int sixlowpan_queue_frames(FAR struct radio_driver_s *radio, iob = net_ioballoc(false); DEBUGASSERT(iob != NULL); - /* Initialize the IOB */ - - iob->io_flink = NULL; - iob->io_len = 0; - iob->io_offset = 0; - iob->io_pktlen = 0; - fptr = iob->io_data; + fptr = iob->io_data; ninfo("Sending packet length %zd\n", buflen); @@ -639,10 +633,7 @@ int sixlowpan_queue_frames(FAR struct radio_driver_s *radio, /* Initialize the IOB */ - iob->io_flink = NULL; - iob->io_len = 0; iob->io_offset = framer_hdrlen; - iob->io_pktlen = 0; fptr = iob->io_data; /* Copy the HC1/HC06/IPv6 header the frame header from first diff --git a/wireless/ieee802154/mac802154.c b/wireless/ieee802154/mac802154.c index 1dba8a23bcc..c6e8ba9eb30 100644 --- a/wireless/ieee802154/mac802154.c +++ b/wireless/ieee802154/mac802154.c @@ -244,11 +244,6 @@ void mac802154_createdatareq(FAR struct ieee802154_privmac_s *priv, iob = iob_alloc(false); DEBUGASSERT(iob != NULL); - iob->io_flink = NULL; - iob->io_len = 0; - iob->io_offset = 0; - iob->io_pktlen = 0; - /* Set the frame control fields */ iob->io_data[0] = 0; @@ -1534,11 +1529,6 @@ static void mac802154_rxdatareq(FAR struct ieee802154_privmac_s *priv, iob = iob_alloc(false); DEBUGASSERT(iob != NULL); - iob->io_flink = NULL; - iob->io_len = 0; - iob->io_offset = 0; - iob->io_pktlen = 0; - iob->io_len += 2; /* Cast the first two bytes of the IOB to a uint16_t frame control field */ diff --git a/wireless/ieee802154/mac802154_assoc.c b/wireless/ieee802154/mac802154_assoc.c index 8eaaf0bfd3c..43d08c39c28 100644 --- a/wireless/ieee802154/mac802154_assoc.c +++ b/wireless/ieee802154/mac802154_assoc.c @@ -135,11 +135,6 @@ int mac802154_req_associate(MACHANDLE mac, iob = iob_alloc(false); DEBUGASSERT(iob != NULL); - iob->io_flink = NULL; - iob->io_len = 0; - iob->io_offset = 0; - iob->io_pktlen = 0; - /* Allocate the txdesc, waiting if necessary */ ret = mac802154_txdesc_alloc(priv, &txdesc); @@ -327,11 +322,6 @@ int mac802154_resp_associate(MACHANDLE mac, iob = iob_alloc(false); DEBUGASSERT(iob != NULL); - iob->io_flink = NULL; - iob->io_len = 0; - iob->io_offset = 0; - iob->io_pktlen = 0; - /* The Destination Addressing Mode and Source Addressing Mode fields shall * each be set to indicate extended addressing. * diff --git a/wireless/ieee802154/mac802154_device.c b/wireless/ieee802154/mac802154_device.c index bfa33743183..965aeea0047 100644 --- a/wireless/ieee802154/mac802154_device.c +++ b/wireless/ieee802154/mac802154_device.c @@ -511,11 +511,6 @@ static ssize_t mac802154dev_write(FAR struct file *filep, iob = iob_alloc(false); DEBUGASSERT(iob != NULL); - iob->io_flink = NULL; - iob->io_len = 0; - iob->io_offset = 0; - iob->io_pktlen = 0; - /* Get the MAC header length */ ret = mac802154_get_mhrlen(dev->md_mac, &tx->meta);