mirror of
https://github.com/Stichting-MINIX-Research-Foundation/pkgsrc-ng.git
synced 2025-09-28 22:44:59 -04:00
29 lines
773 B
Plaintext
29 lines
773 B
Plaintext
$NetBSD: patch-aa,v 1.1 2011/11/30 10:55:50 drochner Exp $
|
|
|
|
poly.c-qh_gethash.patch from upstream
|
|
|
|
--- src/poly.c.orig 2004-01-31 11:00:15.000000000 +0000
|
|
+++ src/poly.c
|
|
@@ -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"
|