diff options
author | Guy Harris <guy@alum.mit.edu> | 2007-04-26 01:01:27 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2007-04-26 01:01:27 +0000 |
commit | bba0b0039261f84b52d731e74856e31be7556d4d (patch) | |
tree | 10f8b7d91e5a7493c476cd106a39e260668a1e99 /epan/address.h | |
parent | 1ed26d317caa512ae730a84e0b41bb35f7b10216 (diff) |
Rename HASH_ADDRESS to ADD_ADDRESS_TO_HASH, to make it clearer what it
does (i.e., it will add the address bytes to the value that's already
there - it will not initialize the value, so you have to clear it before
doing any hashing).
svn path=/trunk/; revision=21578
Diffstat (limited to 'epan/address.h')
-rw-r--r-- | epan/address.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/epan/address.h b/epan/address.h index 11f19d269e..bafeb2a590 100644 --- a/epan/address.h +++ b/epan/address.h @@ -123,16 +123,16 @@ typedef struct _address { } /* - * Hash an address into a hash value. + * Hash an address into a hash value (which must already have been set). */ -#define HASH_ADDRESS(hash_val, addr) { \ - const guint8 *HASH_ADDRESS_data; \ - int HASH_ADDRESS_index; \ - HASH_ADDRESS_data = (addr).data; \ - for (HASH_ADDRESS_index = 0; \ - HASH_ADDRESS_index < (addr).len; - HASH_ADDRESS_index++) \ - hash_val += addrdata[HASH_ADDRESS_index]; \ +#define ADD_ADDRESS_TO_HASH(hash_val, addr) { \ + const guint8 *ADD_ADDRESS_TO_HASH_data; \ + int ADD_ADDRESS_TO_HASH_index; \ + ADD_ADDRESS_TO_HASH_data = (addr).data; \ + for (ADD_ADDRESS_TO_HASH_index = 0; \ + ADD_ADDRESS_TO_HASH_index < (addr).len; + ADD_ADDRESS_TO_HASH_index++) \ + hash_val += addrdata[ADD_ADDRESS_TO_HASH_index]; \ } /* Types of port numbers Wireshark knows about. */ |