A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
these terrible sort operators were working everywhere except on bsd, where qsort...
[simgrid.git]
/
src
/
surf
/
network.c
diff --git
a/src/surf/network.c
b/src/surf/network.c
index
d521acf
..
21a86ea
100644
(file)
--- a/
src/surf/network.c
+++ b/
src/surf/network.c
@@
-81,7
+81,8
@@
static double constant_bandwidth_constraint(double rate, double bound,
static int factor_cmp(const void *pa, const void *pb)
{
static int factor_cmp(const void *pa, const void *pb)
{
- return (((s_smpi_factor_t*)pa)->factor > ((s_smpi_factor_t*)pb)->factor);
+ return (((s_smpi_factor_t*)pa)->factor > ((s_smpi_factor_t*)pb)->factor) ? 1 :
+ (((s_smpi_factor_t*)pa)->factor < ((s_smpi_factor_t*)pb)->factor) ? -1 : 0;
}
}