[GRASS-SVN] r73143 - grass/trunk/lib/vector/neta
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Aug 23 07:16:06 PDT 2018
Author: mmetz
Date: 2018-08-23 07:16:05 -0700 (Thu, 23 Aug 2018)
New Revision: 73143
Modified:
grass/trunk/lib/vector/neta/spanningtree.c
Log:
netalib: sync qsort cp fn
Modified: grass/trunk/lib/vector/neta/spanningtree.c
===================================================================
--- grass/trunk/lib/vector/neta/spanningtree.c 2018-08-22 23:22:17 UTC (rev 73142)
+++ grass/trunk/lib/vector/neta/spanningtree.c 2018-08-23 14:16:05 UTC (rev 73143)
@@ -73,10 +73,10 @@
static int cmp_edge(const void *pa, const void *pb)
{
- if (((edge_cost_pair *) pa)->cost != ((edge_cost_pair *) pb)->cost)
- return (((edge_cost_pair *) pa)->cost > ((edge_cost_pair *) pb)->cost ? 1 : -1);
+ if (((edge_cost_pair *) pa)->cost < ((edge_cost_pair *) pb)->cost)
+ return -1;
- return 0;
+ return (((edge_cost_pair *) pa)->cost > ((edge_cost_pair *) pb)->cost);
}
/*!
More information about the grass-commit
mailing list