diff options
author | Gerald Combs <gerald@wireshark.org> | 2015-10-23 11:14:34 -0700 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2015-10-24 01:44:24 +0000 |
commit | 4f39c603c2f0a2e429afedd18cd5c796bbbf8916 (patch) | |
tree | b531dc21b1155c12e41722defdff2e73442ebab2 /ui | |
parent | ae130f114cd61443c8c93e1c9280e027726a0235 (diff) | |
download | wireshark-4f39c603c2f0a2e429afedd18cd5c796bbbf8916.tar.gz |
More ADDRESS macro to address function conversions.
Replace remaining calls to SET_ADDRESS, CMP_ADDRESS, ADDRESSES_EQUAL,
COPY_ADDRESS, and COPY_ADDRESS_SHALLOW with their lower-case
equivalents.
Replace all ADD_ADDRESS_TO_HASH calls with add_address_to_hash.
Change-Id: I4cff857d7a84085abe0bccd52d2605d2a468bf6f
Reviewed-on: https://code.wireshark.org/review/11229
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'ui')
-rw-r--r-- | ui/gtk/conversation_hastables_dlg.c | 26 | ||||
-rw-r--r-- | ui/voip_calls.c | 4 |
2 files changed, 15 insertions, 15 deletions
diff --git a/ui/gtk/conversation_hastables_dlg.c b/ui/gtk/conversation_hastables_dlg.c index 9c90694ece..88951083fd 100644 --- a/ui/gtk/conversation_hastables_dlg.c +++ b/ui/gtk/conversation_hastables_dlg.c @@ -53,41 +53,41 @@ conversation_hash_exact(gconstpointer v) const conversation_key *key = (const conversation_key *)v; guint hash_val; int i; - const guint8 *ADD_ADDRESS_TO_HASH_data; + const guint8 *add_address_to_hash_data; hash_val = 0; #if 0 - ADD_ADDRESS_TO_HASH(hash_val, &key->addr1); + add_address_to_hash(hash_val, &key->addr1); hash_val += key->port1; - ADD_ADDRESS_TO_HASH(hash_val, &key->addr2); + add_address_to_hash(hash_val, &key->addr2); hash_val += key->port2; return hash_val; #endif for ( i = 0; i < key->addr1.len; i++ ) { - ADD_ADDRESS_TO_HASH_data = (const guint8 *)((&key->addr1)->data); - hash_val += ADD_ADDRESS_TO_HASH_data[i]; + add_address_to_hash_data = (const guint8 *)((&key->addr1)->data); + hash_val += add_address_to_hash_data[i]; hash_val += ( hash_val << 10 ); hash_val ^= ( hash_val >> 6 ); } for ( i = 0; i < 4; i++ ) { - ADD_ADDRESS_TO_HASH_data = (const guint8 *)(&key->port1); - hash_val += ADD_ADDRESS_TO_HASH_data[i]; + add_address_to_hash_data = (const guint8 *)(&key->port1); + hash_val += add_address_to_hash_data[i]; hash_val += ( hash_val << 10 ); hash_val ^= ( hash_val >> 6 ); } for ( i = 0; i < key->addr2.len; i++ ) { - ADD_ADDRESS_TO_HASH_data = (const guint8 *)((&key->addr2)->data); - hash_val += ADD_ADDRESS_TO_HASH_data[i]; + add_address_to_hash_data = (const guint8 *)((&key->addr2)->data); + hash_val += add_address_to_hash_data[i]; hash_val += ( hash_val << 10 ); hash_val ^= ( hash_val >> 6 ); } for ( i = 0; i < 4; i++ ) { - ADD_ADDRESS_TO_HASH_data = (const guint8 *)(&key->port2); - hash_val += ADD_ADDRESS_TO_HASH_data[i]; + add_address_to_hash_data = (const guint8 *)(&key->port2); + hash_val += add_address_to_hash_data[i]; hash_val += ( hash_val << 10 ); hash_val ^= ( hash_val >> 6 ); } @@ -106,9 +106,9 @@ conversation_hash_exact_old(gconstpointer v) guint hash_val; hash_val = 0; - ADD_ADDRESS_TO_HASH(hash_val, &key->addr1); + add_address_to_hash(hash_val, &key->addr1); hash_val += key->port1; - ADD_ADDRESS_TO_HASH(hash_val, &key->addr2); + add_address_to_hash(hash_val, &key->addr2); hash_val += key->port2; return hash_val; diff --git a/ui/voip_calls.c b/ui/voip_calls.c index 0e4e82d9ea..0a630276b4 100644 --- a/ui/voip_calls.c +++ b/ui/voip_calls.c @@ -3160,7 +3160,7 @@ unistim_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *e } } else { /* If no term id use ips / port to find entry */ - if(addresses_equal(&tmp_unistim_info->it_ip, &pinfo->dst) && ADDRESSES_EQUAL(&tmp_unistim_info->ni_ip,&pinfo->src) && (tmp_unistim_info->it_port == pinfo->destport)) { + if(addresses_equal(&tmp_unistim_info->it_ip, &pinfo->dst) && addresses_equal(&tmp_unistim_info->ni_ip,&pinfo->src) && (tmp_unistim_info->it_port == pinfo->destport)) { if(tmp_listinfo->call_state == VOIP_COMPLETED || tmp_listinfo->call_state == VOIP_UNKNOWN) { /* Do nothing previous call */ } else { @@ -3168,7 +3168,7 @@ unistim_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *e break; } } - else if(addresses_equal(&tmp_unistim_info->it_ip, &pinfo->src) && ADDRESSES_EQUAL(&tmp_unistim_info->ni_ip,&pinfo->dst) && (tmp_unistim_info->it_port == pinfo->srcport)) { + else if(addresses_equal(&tmp_unistim_info->it_ip, &pinfo->src) && addresses_equal(&tmp_unistim_info->ni_ip,&pinfo->dst) && (tmp_unistim_info->it_port == pinfo->srcport)) { if(tmp_listinfo->call_state == VOIP_COMPLETED || tmp_listinfo->call_state == VOIP_UNKNOWN) { /* Do nothing, it ain't our call.. */ } else { |