Fix a compiler warning.

This commit is contained in:
Robin Sommer 2013-06-02 20:03:19 -07:00
parent d3d14e10cf
commit 4494643296
3 changed files with 15 additions and 3 deletions

10
CHANGES
View file

@ -1,4 +1,14 @@
2.1-675 | 2013-06-02 20:03:19 -0700
* Fix a compiler warning. (Robin Sommer)
* Allow named vector/set/table/record constructors. Addresses #983.
(Jon Siwek)
* Adding Makefile target test-all that also runs the BroControl test
suite. (Robin Sommer)
2.1-664 | 2013-05-28 21:37:46 -0700
* Dangling pointer fix. Addresses #1004. (Jon Siwek)

View file

@ -1 +1 @@
2.1-664
2.1-675

View file

@ -351,10 +351,12 @@ public:
}
char Type() { return buffer[0]; }
RemoteSerializer::PeerID Peer()
{
// Wow, is this ugly...
return ntohl(*(uint32*)(buffer + 4));
uint32 tmp;
memcpy(&tmp, buffer + 4, sizeof(tmp));
return ntohl(tmp);
}
const char* Raw() { return buffer; }