mirror of
https://github.com/apache/nuttx.git
synced 2026-06-04 06:42:32 +08:00
mm/iob: iob members are initialized after allocate
Signed-off-by: chao an <anchao@xiaomi.com>
This commit is contained in:
@@ -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 */
|
||||
|
||||
@@ -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.
|
||||
*
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user