Improve checkpointing of ethernet packets a bit.
authorNathan Binkert <binkertn@umich.edu>
Mon, 2 May 2005 22:55:39 +0000 (18:55 -0400)
committerNathan Binkert <binkertn@umich.edu>
Mon, 2 May 2005 22:55:39 +0000 (18:55 -0400)
dev/etherpkt.cc:
    Don't try to suck in the packet if the length is zero.

--HG--
extra : convert_revision : 7212f3b677777fbce301f0613b9f513bb9fe057e

dev/etherpkt.cc

index bf60bc150b00465f26688ae1f7335abbd4b22ab3..475274326a8390f6a95912e02d9acc02b21b0934 100644 (file)
@@ -46,5 +46,6 @@ PacketData::unserialize(const string &base, Checkpoint *cp,
                         const string &section)
 {
     paramIn(cp, section, base + ".length", length);
-    arrayParamIn(cp, section, base + ".data", data, length);
+    if (length)
+        arrayParamIn(cp, section, base + ".data", data, length);
 }