diff mbox

[vis] Remove duplicate routes from vis output (revised)

Message ID 200907160137.39536.lindner_marek@yahoo.de
State Accepted, archived
Headers show

Commit Message

Marek Lindner July 15, 2009, 5:37 p.m. UTC
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>
diff mbox

Patch

Index: vis/vis.c
===================================================================
--- vis/vis.c	(revision 1343)
+++ vis/vis.c	(working copy)
@@ -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 */