[vis] Remove duplicate routes from vis output (revised)
Commit Message
Revision 1271 introduced a bug on the call to hash->compare() that
caused duplicate routes to appear in the vis output. Adapting the
hash->compare() callback fixes the problem.
Signed-off-by: Edwe Cowley <edwecowley@gmail.com>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
===================================================================
@@ -119,8 +119,9 @@
return stop != 0;
}
-int32_t orig_comp(void *data1, void *data2) {
- return(memcmp(data1, data2, 4));
+int32_t orig_comp(void *data1, void *data2)
+{
+ return (memcmp(data1, data2, 4) == 0 ? 1 : 0);
}
/* hashfunction to choose an entry in a hash table of given size */