diff options
author | Nathan Binkert <binkertn@umich.edu> | 2004-11-18 16:23:31 -0500 |
---|---|---|
committer | Nathan Binkert <binkertn@umich.edu> | 2004-11-18 16:23:31 -0500 |
commit | 86836124ed272945e9d360c068728cd03917398d (patch) | |
tree | 9ed1b9a3cfe3552e7a62d6b202436fd00acf2e3e /dev/ethertap.cc | |
parent | e3c3e44ac15f030ca5b76dbdb85584e20932ee94 (diff) | |
download | gem5-86836124ed272945e9d360c068728cd03917398d.tar.xz |
always initalize the size of a packet (forgotten on checkpoints
in some places). use the constructor for setting the size.
--HG--
extra : convert_revision : fad322c1d45b1952804cf35942b5685d70128e59
Diffstat (limited to 'dev/ethertap.cc')
-rw-r--r-- | dev/ethertap.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/dev/ethertap.cc b/dev/ethertap.cc index 03f2724b1..1603a9bd3 100644 --- a/dev/ethertap.cc +++ b/dev/ethertap.cc @@ -219,8 +219,7 @@ EtherTap::process(int revent) while (data_len != 0 && buffer_offset >= data_len + sizeof(u_int32_t)) { PacketPtr packet; - packet = new PacketData; - packet->data = new uint8_t[data_len]; + packet = new PacketData(data_len); packet->length = data_len; memcpy(packet->data, data, data_len); |