# HG changeset patch # User terom # Date 1229476406 0 # Node ID 2a57f0a871b020b127e92aca59c45e1d8dd6fb4f # Parent 190f81d30624acb7f057aa17ec633bffa967d7c7 note broken use of memcmp in NetworkAddress, and delete generated doc/final_document.pdf file diff -r 190f81d30624 -r 2a57f0a871b0 doc/final_document.pdf Binary file doc/final_document.pdf has changed diff -r 190f81d30624 -r 2a57f0a871b0 src/Network/Address.hh --- a/src/Network/Address.hh Wed Dec 17 00:44:46 2008 +0000 +++ b/src/Network/Address.hh Wed Dec 17 01:13:26 2008 +0000 @@ -90,14 +90,16 @@ virtual void free_addrinfo (addrinfo *info) const; /** - * Equal-to comparison operator. Invalid addresses compare equal and are always smaller + * Equal-to comparison operator. Invalid addresses compare equal and are always smaller. + * + * XXX: use of memcmp is broken... there's garbage in the padding */ bool operator== (const NetworkAddress &other) const { return (address_length == other.address_length) && memcmp(&address, &other.address, address_length) == 0; } /** - * Not-equal-to comparison operator. Invalid addresses compare equal and are always smaller + * Not-equal-to comparison operator. Invalid addresses compare equal and are always smaller. */ bool operator!= (const NetworkAddress &other) const { return (address_length != other.address_length) || memcmp(&address, &other.address, address_length) != 0;