26 lines
810 B
Diff
26 lines
810 B
Diff
|
diff -up qhull-2003.1/src/poly.c.qh_gethash qhull-2003.1/src/poly.c
|
||
|
--- qhull-2003.1/src/poly.c.qh_gethash 2004-01-31 04:00:15.000000000 -0700
|
||
|
+++ qhull-2003.1/src/poly.c 2010-02-01 14:07:45.851966800 -0700
|
||
|
@@ -403,6 +403,7 @@ unsigned qh_gethash (int hashsize, setT
|
||
|
void **elemp= SETelemaddr_(set, firstindex, void);
|
||
|
ptr_intT hash = 0, elem;
|
||
|
int i;
|
||
|
+ unsigned result;
|
||
|
|
||
|
switch (size-firstindex) {
|
||
|
case 1:
|
||
|
@@ -441,9 +442,10 @@ unsigned qh_gethash (int hashsize, setT
|
||
|
}while(*elemp);
|
||
|
break;
|
||
|
}
|
||
|
- hash %= (ptr_intT) hashsize;
|
||
|
- /* hash= 0; for debugging purposes */
|
||
|
- return hash;
|
||
|
+ result= (unsigned)hash;
|
||
|
+ result %= (unsigned)hashsize;
|
||
|
+ /* result= 0; for debugging purposes */
|
||
|
+ return result;
|
||
|
} /* gethash */
|
||
|
|
||
|
/*-<a href="qh-poly.htm#TOC"
|