diff options
author | pdw <> | 2004-02-05 22:58:06 +0000 |
---|---|---|
committer | pdw <> | 2004-02-05 22:58:06 +0000 |
commit | 2fd7012129ac64b99e64cddee6b3697f4adb76d1 (patch) | |
tree | 5f0949147f4aa0742018091d6b2853e2696dbc05 /iftop.c | |
parent | f123c4f1f7324bdf4eb45c1538cd9b0de6225b71 (diff) | |
download | iftop-2fd7012129ac64b99e64cddee6b3697f4adb76d1.zip |
Fixes for type-punned pointers - Henne Vogelsang <hvogel@suse.de>
Diffstat (limited to 'iftop.c')
-rw-r--r-- | iftop.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -187,6 +187,10 @@ static void handle_ip_packet(struct ip* iptr, int hw_dir) { int direction = 0; /* incoming */ history_type* ht; + union { + history_type **ht_pp; + void **void_pp; + } u_ht = { &ht }; addr_pair ap; int len; @@ -261,7 +265,7 @@ static void handle_ip_packet(struct ip* iptr, int hw_dir) resolve(&iptr->ip_dst, NULL, 0); resolve(&iptr->ip_src, NULL, 0); - if(hash_find(history, &ap, (void**)&ht) == HASH_STATUS_KEY_NOT_FOUND) { + if(hash_find(history, &ap, u_ht.void_pp) == HASH_STATUS_KEY_NOT_FOUND) { ht = history_create(); hash_insert(history, &ap, ht); } |