note broken use of memcmp in NetworkAddress, and delete generated doc/final_document.pdf file
authorterom
Wed, 17 Dec 2008 01:13:26 +0000
changeset 383 2a57f0a871b0
parent 382 190f81d30624
child 384 6d387796b139
note broken use of memcmp in NetworkAddress, and delete generated doc/final_document.pdf file
doc/final_document.pdf
src/Network/Address.hh
Binary file doc/final_document.pdf has changed
--- 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;